/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.8
 *
 * 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 SWIGPYTHON
#define SWIGPYTHON
#endif

#define SWIG_PYTHON_DIRECTOR_NO_VTABLE


#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 (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

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

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

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

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

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

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


#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#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 = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (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



/* Compatibility macros for Python 3 */
#if PY_VERSION_HEX >= 0x03000000

#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
#define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
#define PyString_Check(name) PyBytes_Check(name)
#define PyString_FromString(x) PyUnicode_FromString(x)
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
#define PyString_AsString(str) PyBytes_AsString(str)
#define PyString_Size(str) PyBytes_Size(str)	
#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)

#endif

#ifndef Py_TYPE
#  define Py_TYPE(op) ((op)->ob_type)
#endif

/* SWIG APIs for compatibility of both Python 2 & 3 */

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
#else
#  define SWIG_Python_str_FromFormat PyString_FromFormat
#endif


/* Warning: This function will allocate a new string in Python 3,
 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
 */
SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject *str)
{
#if PY_VERSION_HEX >= 0x03000000
  char *cstr;
  char *newstr;
  Py_ssize_t len;
  str = PyUnicode_AsUTF8String(str);
  PyBytes_AsStringAndSize(str, &cstr, &len);
  newstr = (char *) malloc(len+1);
  memcpy(newstr, cstr, len+1);
  Py_XDECREF(str);
  return newstr;
#else
  return PyString_AsString(str);
#endif
}

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
#else
#  define SWIG_Python_str_DelForPy3(x) 
#endif


SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char *c)
{
#if PY_VERSION_HEX >= 0x03000000
  return PyUnicode_FromString(c); 
#else
  return PyString_FromString(c);
#endif
}

/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
#  define PyOS_snprintf _snprintf
# else
#  define PyOS_snprintf snprintf
# endif
#endif

/* A crude PyString_FromFormat implementation for old Pythons */
#if PY_VERSION_HEX < 0x02020000

#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif

static PyObject *
PyString_FromFormat(const char *fmt, ...) {
  va_list ap;
  char buf[SWIG_PYBUFFER_SIZE * 2];
  int res;
  va_start(ap, fmt);
  res = vsnprintf(buf, sizeof(buf), fmt, ap);
  va_end(ap);
  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
}
#endif

/* Add PyObject_Del for old Pythons */
#if PY_VERSION_HEX < 0x01060000
# define PyObject_Del(op) PyMem_DEL((op))
#endif
#ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del
#endif

/* A crude PyExc_StopIteration exception for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# ifndef PyExc_StopIteration
#  define PyExc_StopIteration PyExc_RuntimeError
# endif
# ifndef PyObject_GenericGetAttr
#  define PyObject_GenericGetAttr 0
# endif
#endif

/* Py_NotImplemented is defined in 2.1 and up. */
#if PY_VERSION_HEX < 0x02010000
# ifndef Py_NotImplemented
#  define Py_NotImplemented PyExc_RuntimeError
# endif
#endif

/* A crude PyString_AsStringAndSize implementation for old Pythons */
#if PY_VERSION_HEX < 0x02010000
# ifndef PyString_AsStringAndSize
#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
# endif
#endif

/* PySequence_Size for old Pythons */
#if PY_VERSION_HEX < 0x02000000
# ifndef PySequence_Size
#  define PySequence_Size PySequence_Length
# endif
#endif

/* PyBool_FromLong for old Pythons */
#if PY_VERSION_HEX < 0x02030000
static
PyObject *PyBool_FromLong(long ok)
{
  PyObject *result = ok ? Py_True : Py_False;
  Py_INCREF(result);
  return result;
}
#endif

/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
typedef intintargfunc ssizessizeargfunc;
typedef intobjargproc ssizeobjargproc;
typedef intintobjargproc ssizessizeobjargproc;
typedef getreadbufferproc readbufferproc;
typedef getwritebufferproc writebufferproc;
typedef getsegcountproc segcountproc;
typedef getcharbufferproc charbufferproc;
static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
{
  long result = 0;
  PyObject *i = PyNumber_Int(x);
  if (i) {
    result = PyInt_AsLong(i);
    Py_DECREF(i);
  }
  return result;
}
#endif

#if PY_VERSION_HEX < 0x02050000
#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
#endif

#if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op)				\
  do { 						\
    if (op) {					\
      int vret = visit((op), arg);		\
      if (vret)					\
        return vret;				\
    }						\
  } while (0)
#endif

#if PY_VERSION_HEX < 0x02030000
typedef struct {
  PyTypeObject type;
  PyNumberMethods as_number;
  PyMappingMethods as_mapping;
  PySequenceMethods as_sequence;
  PyBufferProcs as_buffer;
  PyObject *name, *slots;
} PyHeapTypeObject;
#endif

#if PY_VERSION_HEX < 0x02030000
typedef destructor freefunc;
#endif

#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
     (PY_MAJOR_VERSION > 3))
# define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
#endif

#if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#endif

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

SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code) {
  PyObject* type = 0;
  switch(code) {
  case SWIG_MemoryError:
    type = PyExc_MemoryError;
    break;
  case SWIG_IOError:
    type = PyExc_IOError;
    break;
  case SWIG_RuntimeError:
    type = PyExc_RuntimeError;
    break;
  case SWIG_IndexError:
    type = PyExc_IndexError;
    break;
  case SWIG_TypeError:
    type = PyExc_TypeError;
    break;
  case SWIG_DivisionByZero:
    type = PyExc_ZeroDivisionError;
    break;
  case SWIG_OverflowError:
    type = PyExc_OverflowError;
    break;
  case SWIG_SyntaxError:
    type = PyExc_SyntaxError;
    break;
  case SWIG_ValueError:
    type = PyExc_ValueError;
    break;
  case SWIG_SystemError:
    type = PyExc_SystemError;
    break;
  case SWIG_AttributeError:
    type = PyExc_AttributeError;
    break;
  default:
    type = PyExc_RuntimeError;
  }
  return type;
}


SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char* mesg)
{
  PyObject *type = 0;
  PyObject *value = 0;
  PyObject *traceback = 0;

  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
  if (value) {
    char *tmp;
    PyObject *old_str = PyObject_Str(value);
    PyErr_Clear();
    Py_XINCREF(type);

    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(old_str);
    Py_DECREF(value);
  } else {
    PyErr_SetString(PyExc_RuntimeError, mesg);
  }
}

#if defined(SWIG_PYTHON_NO_THREADS)
#  if defined(SWIG_PYTHON_THREADS)
#    undef SWIG_PYTHON_THREADS
#  endif
#endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
#      define SWIG_PYTHON_USE_GIL
#    endif
#  endif
#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
#    endif
#    ifdef __cplusplus /* C++ code */
       class SWIG_Python_Thread_Block {
         bool status;
         PyGILState_STATE state;
       public:
         void end() { if (status) { PyGILState_Release(state); status = false;} }
         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
         ~SWIG_Python_Thread_Block() { end(); }
       };
       class SWIG_Python_Thread_Allow {
         bool status;
         PyThreadState *save;
       public:
         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
         ~SWIG_Python_Thread_Allow() { end(); }
       };
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
#    else /* C code */
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
#    endif
#  else /* Old thread way, not implemented, user must provide it */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      define SWIG_PYTHON_INITIALIZE_THREADS
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
#      define SWIG_PYTHON_THREAD_END_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
#      define SWIG_PYTHON_THREAD_END_ALLOW
#    endif
#  endif
#else /* No thread support */
#  define SWIG_PYTHON_INITIALIZE_THREADS
#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#  define SWIG_PYTHON_THREAD_END_BLOCK
#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#  define SWIG_PYTHON_THREAD_END_ALLOW
#endif

/* -----------------------------------------------------------------------------
 * Python API portion that goes into the runtime
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

/* -----------------------------------------------------------------------------
 * Constant declarations
 * ----------------------------------------------------------------------------- */

/* Constant Types */
#define SWIG_PY_POINTER 4
#define SWIG_PY_BINARY  5

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


/* -----------------------------------------------------------------------------
 * Wrapper of PyInstanceMethod_New() used in Python 3
 * It is exported to the generated module, used for -fastproxy
 * ----------------------------------------------------------------------------- */
#if PY_VERSION_HEX >= 0x03000000
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
{
  return PyInstanceMethod_New(func);
}
#else
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
{
  return NULL;
}
#endif

#ifdef __cplusplus
}
#endif


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

/* Common SWIG API */

/* for raw pointers */
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)

#ifdef SWIGPYTHON_BUILTIN
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
#else
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
#endif

#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)

#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
#define swig_owntype                                    int

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, 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_Python_ConvertFunctionPtr(obj, pptr, type)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)

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


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)

#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
#define SWIG_fail                        		goto fail					   


/* Runtime API implementation */

/* Error manipulation */

SWIGINTERN void 
SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
  PyErr_SetObject(errtype, obj);
  Py_DECREF(obj);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

SWIGINTERN void 
SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  PyErr_SetString(errtype, msg);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)

/* Set a constant value */

#if defined(SWIGPYTHON_BUILTIN)

SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  PyObject *s = PyString_InternFromString(key);
  PyList_Append(seq, s);
  Py_DECREF(s);
}

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
#if PY_VERSION_HEX < 0x02030000
  PyDict_SetItemString(d, (char *)name, obj);
#else
  PyDict_SetItemString(d, name, obj);
#endif
  Py_DECREF(obj);
  if (public_interface)
    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
}

#else

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
#if PY_VERSION_HEX < 0x02030000
  PyDict_SetItemString(d, (char *)name, obj);
#else
  PyDict_SetItemString(d, name, obj);
#endif
  Py_DECREF(obj);                            
}

#endif

/* Append a value to the result obj */

SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyList_Check(result)) {
      PyObject *o2 = result;
      result = PyList_New(1);
      PyList_SetItem(result, 0, o2);
    }
    PyList_Append(result,obj);
    Py_DECREF(obj);
  }
  return result;
#else
  PyObject*   o2;
  PyObject*   o3;
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyTuple_Check(result)) {
      o2 = result;
      result = PyTuple_New(1);
      PyTuple_SET_ITEM(result, 0, o2);
    }
    o3 = PyTuple_New(1);
    PyTuple_SET_ITEM(o3, 0, obj);
    o2 = result;
    result = PySequence_Concat(o2, o3);
    Py_DECREF(o2);
    Py_DECREF(o3);
  }
  return result;
#endif
}

/* Unpack the argument tuple */

SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
  if (!args) {
    if (!min && !max) {
      return 1;
    } else {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
		   name, (min == max ? "" : "at least "), (int)min);
      return 0;
    }
  }  
  if (!PyTuple_Check(args)) {
    if (min <= 1 && max >= 1) {
      Py_ssize_t i;
      objs[0] = args;
      for (i = 1; i < max; ++i) {
	objs[i] = 0;
      }
      return 2;
    }
    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    return 0;
  } else {
    Py_ssize_t l = PyTuple_GET_SIZE(args);
    if (l < min) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at least "), (int)min, (int)l);
      return 0;
    } else if (l > max) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at most "), (int)max, (int)l);
      return 0;
    } else {
      Py_ssize_t i;
      for (i = 0; i < l; ++i) {
	objs[i] = PyTuple_GET_ITEM(args, i);
      }
      for (; l < max; ++l) {
	objs[l] = 0;
      }
      return i + 1;
    }    
  }
}

/* A functor is a function object with one single object argument */
#if PY_VERSION_HEX >= 0x02020000
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
#else
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
#endif

/*
  Helper for static pointer initialization for both C and C++ code, for example
  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
*/
#ifdef __cplusplus
#define SWIG_STATIC_POINTER(var)  var
#else
#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
#endif

/* -----------------------------------------------------------------------------
 * Pointer declarations
 * ----------------------------------------------------------------------------- */

/* Flags for new pointer objects */
#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)

#ifdef __cplusplus
extern "C" {
#endif

/*  How to access Py_None */
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#  ifndef SWIG_PYTHON_NO_BUILD_NONE
#    ifndef SWIG_PYTHON_BUILD_NONE
#      define SWIG_PYTHON_BUILD_NONE
#    endif
#  endif
#endif

#ifdef SWIG_PYTHON_BUILD_NONE
#  ifdef Py_None
#   undef Py_None
#   define Py_None SWIG_Py_None()
#  endif
SWIGRUNTIMEINLINE PyObject * 
_SWIG_Py_None(void)
{
  PyObject *none = Py_BuildValue((char*)"");
  Py_DECREF(none);
  return none;
}
SWIGRUNTIME PyObject * 
SWIG_Py_None(void)
{
  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
  return none;
}
#endif

/* The python void return value */

SWIGRUNTIMEINLINE PyObject * 
SWIG_Py_Void(void)
{
  PyObject *none = Py_None;
  Py_INCREF(none);
  return none;
}

/* SwigPyClientData */

typedef struct {
  PyObject *klass;
  PyObject *newraw;
  PyObject *newargs;
  PyObject *destroy;
  int delargs;
  int implicitconv;
  PyTypeObject *pytype;
} SwigPyClientData;

SWIGRUNTIMEINLINE int 
SWIG_Python_CheckImplicit(swig_type_info *ty)
{
  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  return data ? data->implicitconv : 0;
}

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  PyObject *klass = data ? data->klass : 0;
  return (klass ? klass : PyExc_RuntimeError);
}


SWIGRUNTIME SwigPyClientData * 
SwigPyClientData_New(PyObject* obj)
{
  if (!obj) {
    return 0;
  } else {
    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    /* the klass element */
    data->klass = obj;
    Py_INCREF(data->klass);
    /* the newraw method and newargs arguments used to create a new raw instance */
    if (PyClass_Check(obj)) {
      data->newraw = 0;
      data->newargs = obj;
      Py_INCREF(obj);
    } else {
#if (PY_VERSION_HEX < 0x02020000)
      data->newraw = 0;
#else
      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
#endif
      if (data->newraw) {
	Py_INCREF(data->newraw);
	data->newargs = PyTuple_New(1);
	PyTuple_SetItem(data->newargs, 0, obj);
      } else {
	data->newargs = obj;
      }
      Py_INCREF(data->newargs);
    }
    /* the destroy method, aka as the C++ delete method */
    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
    if (PyErr_Occurred()) {
      PyErr_Clear();
      data->destroy = 0;
    }
    if (data->destroy) {
      int flags;
      Py_INCREF(data->destroy);
      flags = PyCFunction_GET_FLAGS(data->destroy);
#ifdef METH_O
      data->delargs = !(flags & (METH_O));
#else
      data->delargs = 0;
#endif
    } else {
      data->delargs = 0;
    }
    data->implicitconv = 0;
    data->pytype = 0;
    return data;
  }
}

SWIGRUNTIME void 
SwigPyClientData_Del(SwigPyClientData *data) {
  Py_XDECREF(data->newraw);
  Py_XDECREF(data->newargs);
  Py_XDECREF(data->destroy);
}

/* =============== SwigPyObject =====================*/

typedef struct {
  PyObject_HEAD
  void *ptr;
  swig_type_info *ty;
  int own;
  PyObject *next;
#ifdef SWIGPYTHON_BUILTIN
  PyObject *dict;
#endif
} SwigPyObject;


#ifdef SWIGPYTHON_BUILTIN

SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;

  if (!sobj->dict)
    sobj->dict = PyDict_New();

  Py_INCREF(sobj->dict);
  return sobj->dict;
}

#endif

SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject *v)
{
  return PyLong_FromVoidPtr(v->ptr);
}

SWIGRUNTIME PyObject *
SwigPyObject_format(const char* fmt, SwigPyObject *v)
{
  PyObject *res = NULL;
  PyObject *args = PyTuple_New(1);
  if (args) {
    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
      if (ofmt) {
#if PY_VERSION_HEX >= 0x03000000
	res = PyUnicode_Format(ofmt,args);
#else
	res = PyString_Format(ofmt,args);
#endif
	Py_DECREF(ofmt);
      }
      Py_DECREF(args);
    }
  }
  return res;
}

SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject *v)
{
  return SwigPyObject_format("%o",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject *v)
{
  return SwigPyObject_format("%x",v);
}

SWIGRUNTIME PyObject *
#ifdef METH_NOARGS
SwigPyObject_repr(SwigPyObject *v)
#else
SwigPyObject_repr(SwigPyObject *v, PyObject *args)
#endif
{
  const char *name = SWIG_TypePrettyName(v->ty);
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  if (v->next) {
# ifdef METH_NOARGS
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# else
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
# endif
# if PY_VERSION_HEX >= 0x03000000
    PyObject *joined = PyUnicode_Concat(repr, nrep);
    Py_DecRef(repr);
    Py_DecRef(nrep);
    repr = joined;
# else
    PyString_ConcatAndDel(&repr,nrep);
# endif
  }
  return repr;  
}

SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{
  void *i = v->ptr;
  void *j = w->ptr;
  return (i < j) ? -1 : ((i > j) ? 1 : 0);
}

/* Added for Python 3.x, would it also be useful for Python 2.x? */
SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
{
  PyObject* res;
  if( op != Py_EQ && op != Py_NE ) {
    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
  }
  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  return res;  
}


SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

#ifdef SWIGPYTHON_BUILTIN
static swig_type_info *SwigPyObject_stype = 0;
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
    SwigPyClientData *cd;
    assert(SwigPyObject_stype);
    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
    assert(cd);
    assert(cd->pytype);
    return cd->pytype;
}
#else
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  return type;
}
#endif

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
#ifdef SWIGPYTHON_BUILTIN
  PyTypeObject *target_tp = SwigPyObject_type();
  if (PyType_IsSubtype(op->ob_type, target_tp))
    return 1;
  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
#else
  return (Py_TYPE(op) == SwigPyObject_type())
    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
#endif
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own);

SWIGRUNTIME void
SwigPyObject_dealloc(PyObject *v)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  PyObject *next = sobj->next;
  if (sobj->own == SWIG_POINTER_OWN) {
    swig_type_info *ty = sobj->ty;
    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    PyObject *destroy = data ? data->destroy : 0;
    if (destroy) {
      /* destroy is always a VARARGS method */
      PyObject *res;

      /* PyObject_CallFunction() has the potential to silently drop
         the active active exception.  In cases of unnamed temporary
         variable or where we just finished iterating over a generator
         StopIteration will be active right now, and this needs to
         remain true upon return from SwigPyObject_dealloc.  So save
         and restore. */
      
      PyObject *val = NULL, *type = NULL, *tb = NULL;
      PyErr_Fetch(&val, &type, &tb);

      if (data->delargs) {
        /* we need to create a temporary object to carry the destroy operation */
        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
        res = SWIG_Python_CallFunctor(destroy, tmp);
        Py_DECREF(tmp);
      } else {
        PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
        PyObject *mself = PyCFunction_GET_SELF(destroy);
        res = ((*meth)(mself, v));
      }
      if (!res)
        PyErr_WriteUnraisable(destroy);

      PyErr_Restore(val, type, tb);

      Py_XDECREF(res);
    } 
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    else {
      const char *name = SWIG_TypePrettyName(ty);
      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    }
#endif
  } 
  Py_XDECREF(next);
  PyObject_DEL(v);
}

SWIGRUNTIME PyObject* 
SwigPyObject_append(PyObject* v, PyObject* next)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
#ifndef METH_O
  PyObject *tmp = 0;
  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
  next = tmp;
#endif
  if (!SwigPyObject_Check(next)) {
    PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
    return NULL;
  }
  sobj->next = next;
  Py_INCREF(next);
  return SWIG_Py_Void();
}

SWIGRUNTIME PyObject* 
#ifdef METH_NOARGS
SwigPyObject_next(PyObject* v)
#else
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (sobj->next) {    
    Py_INCREF(sobj->next);
    return sobj->next;
  } else {
    return SWIG_Py_Void();
  }
}

SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_disown(PyObject *v)
#else
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = 0;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_acquire(PyObject *v)
#else
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = SWIG_POINTER_OWN;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args)
{
  PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000)
  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
#elif (PY_VERSION_HEX < 0x02050000)
  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
#else
  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
#endif
    {
      return NULL;
    } 
  else
    {
      SwigPyObject *sobj = (SwigPyObject *)v;
      PyObject *obj = PyBool_FromLong(sobj->own);
      if (val) {
#ifdef METH_NOARGS
	if (PyObject_IsTrue(val)) {
	  SwigPyObject_acquire(v);
	} else {
	  SwigPyObject_disown(v);
	}
#else
	if (PyObject_IsTrue(val)) {
	  SwigPyObject_acquire(v,args);
	} else {
	  SwigPyObject_disown(v,args);
	}
#endif
      } 
      return obj;
    }
}

#ifdef METH_O
static PyMethodDef
swigobject_methods[] = {
  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"acquires ownership of the pointer"},
  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
  {0, 0, 0, 0}  
};
#else
static PyMethodDef
swigobject_methods[] = {
  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"acquires ownership of the pointer"},
  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
  {0, 0, 0, 0}  
};
#endif

#if PY_VERSION_HEX < 0x02020000
SWIGINTERN PyObject *
SwigPyObject_getattr(SwigPyObject *sobj,char *name)
{
  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
}
#endif

SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) {
  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";

  static PyNumberMethods SwigPyObject_as_number = {
    (binaryfunc)0, /*nb_add*/
    (binaryfunc)0, /*nb_subtract*/
    (binaryfunc)0, /*nb_multiply*/
    /* nb_divide removed in Python 3 */
#if PY_VERSION_HEX < 0x03000000
    (binaryfunc)0, /*nb_divide*/
#endif
    (binaryfunc)0, /*nb_remainder*/
    (binaryfunc)0, /*nb_divmod*/
    (ternaryfunc)0,/*nb_power*/
    (unaryfunc)0,  /*nb_negative*/
    (unaryfunc)0,  /*nb_positive*/
    (unaryfunc)0,  /*nb_absolute*/
    (inquiry)0,    /*nb_nonzero*/
    0,		   /*nb_invert*/
    0,		   /*nb_lshift*/
    0,		   /*nb_rshift*/
    0,		   /*nb_and*/
    0,		   /*nb_xor*/
    0,		   /*nb_or*/
#if PY_VERSION_HEX < 0x03000000
    0,   /*nb_coerce*/
#endif
    (unaryfunc)SwigPyObject_long, /*nb_int*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_long, /*nb_long*/
#else
    0, /*nb_reserved*/
#endif
    (unaryfunc)0,                 /*nb_float*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif
  };

  static PyTypeObject swigpyobject_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
      /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      (char *)"SwigPyObject",               /* tp_name */
      sizeof(SwigPyObject),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
      0,				    /* tp_print */
#if PY_VERSION_HEX < 0x02020000
      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
#else
      (getattrfunc)0,                       /* tp_getattr */
#endif
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000
    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
#else
      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyObject_repr,          /* tp_repr */
      &SwigPyObject_as_number,              /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      0,				    /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigobject_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      swigobject_methods,                   /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
      0,                                    /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
      0,                                    /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
      0,                                    /* tp_prev */
#endif
      0                                     /* tp_next */
#endif
    };
    swigpyobject_type = tmp;
    type_init = 1;
#if PY_VERSION_HEX < 0x02020000
    swigpyobject_type.ob_type = &PyType_Type;
#else
    if (PyType_Ready(&swigpyobject_type) < 0)
      return NULL;
#endif
  }
  return &swigpyobject_type;
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
{
  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  if (sobj) {
    sobj->ptr  = ptr;
    sobj->ty   = ty;
    sobj->own  = own;
    sobj->next = 0;
  }
  return (PyObject *)sobj;
}

/* -----------------------------------------------------------------------------
 * Implements a simple Swig Packed type, and use it instead of string
 * ----------------------------------------------------------------------------- */

typedef struct {
  PyObject_HEAD
  void *pack;
  swig_type_info *ty;
  size_t size;
} SwigPyPacked;

SWIGRUNTIME int
SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
  char result[SWIG_BUFFER_SIZE];
  fputs("<Swig Packed ", fp); 
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    fputs("at ", fp); 
    fputs(result, fp); 
  }
  fputs(v->ty->name,fp); 
  fputs(">", fp);
  return 0; 
}
  
SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  }  
}

SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromChar(v->ty->name);
  }  
}

SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
{
  size_t i = v->size;
  size_t j = w->size;
  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
}

SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);

SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  return type;
}

SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject *op) {
  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
}

SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject *v)
{
  if (SwigPyPacked_Check(v)) {
    SwigPyPacked *sobj = (SwigPyPacked *) v;
    free(sobj->pack);
  }
  PyObject_DEL(v);
}

SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void) {
  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  static PyTypeObject swigpypacked_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
      /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX>=0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      (char *)"SwigPyPacked",               /* tp_name */
      sizeof(SwigPyPacked),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
      (printfunc)SwigPyPacked_print,        /* tp_print */
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX>=0x03000000
      0, /* tp_reserved in 3.0.1 */
#else
      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
      0,                                    /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      (reprfunc)SwigPyPacked_str,           /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigpacked_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      0,                                    /* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      0,                                    /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
      0,                                    /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
      0,                                    /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
      0,                                    /* tp_prev */
#endif
      0                                     /* tp_next */
#endif
    };
    swigpypacked_type = tmp;
    type_init = 1;
#if PY_VERSION_HEX < 0x02020000
    swigpypacked_type.ob_type = &PyType_Type;
#else
    if (PyType_Ready(&swigpypacked_type) < 0)
      return NULL;
#endif
  }
  return &swigpypacked_type;
}

SWIGRUNTIME PyObject *
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
{
  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  if (sobj) {
    void *pack = malloc(size);
    if (pack) {
      memcpy(pack, ptr, size);
      sobj->pack = pack;
      sobj->ty   = ty;
      sobj->size = size;
    } else {
      PyObject_DEL((PyObject *) sobj);
      sobj = 0;
    }
  }
  return (PyObject *) sobj;
}

SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
{
  if (SwigPyPacked_Check(obj)) {
    SwigPyPacked *sobj = (SwigPyPacked *)obj;
    if (sobj->size != size) return 0;
    memcpy(ptr, sobj->pack, size);
    return sobj->ty;
  } else {
    return 0;
  }
}

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

SWIGRUNTIMEINLINE PyObject *
_SWIG_This(void)
{
    return SWIG_Python_str_FromChar("this");
}

static PyObject *swig_this = NULL;

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  if (swig_this == NULL)
    swig_this = _SWIG_This();
  return swig_this;
}

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

/* TODO: I don't know how to implement the fast getset in Python 3 right now */
#if PY_VERSION_HEX>=0x03000000
#define SWIG_PYTHON_SLOW_GETSET_THIS 
#endif

SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject *pyobj) 
{
  PyObject *obj;

  if (SwigPyObject_Check(pyobj))
    return (SwigPyObject *) pyobj;

#ifdef SWIGPYTHON_BUILTIN
  (void)obj;
# ifdef PyWeakref_CheckProxy
  if (PyWeakref_CheckProxy(pyobj)) {
    pyobj = PyWeakref_GET_OBJECT(pyobj);
    if (pyobj && SwigPyObject_Check(pyobj))
      return (SwigPyObject*) pyobj;
  }
# endif
  return NULL;
#else

  obj = 0;

#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
  if (PyInstance_Check(pyobj)) {
    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
  } else {
    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    if (dictptr != NULL) {
      PyObject *dict = *dictptr;
      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    } else {
#ifdef PyWeakref_CheckProxy
      if (PyWeakref_CheckProxy(pyobj)) {
	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
      }
#endif
      obj = PyObject_GetAttr(pyobj,SWIG_This());
      if (obj) {
	Py_DECREF(obj);
      } else {
	if (PyErr_Occurred()) PyErr_Clear();
	return 0;
      }
    }
  }
#else
  obj = PyObject_GetAttr(pyobj,SWIG_This());
  if (obj) {
    Py_DECREF(obj);
  } else {
    if (PyErr_Occurred()) PyErr_Clear();
    return 0;
  }
#endif
  if (obj && !SwigPyObject_Check(obj)) {
    /* a PyObject is called 'this', try to get the 'real this'
       SwigPyObject from it */ 
    return SWIG_Python_GetSwigThis(obj);
  }
  return (SwigPyObject *)obj;
#endif
}

/* Acquire a pointer value */

SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  if (own == SWIG_POINTER_OWN) {
    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    if (sobj) {
      int oldown = sobj->own;
      sobj->own = own;
      return oldown;
    }
  }
  return 0;
}

/* Convert a pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  int res;
  SwigPyObject *sobj;
  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;

  if (!obj)
    return SWIG_ERROR;
  if (obj == Py_None && !implicit_conv) {
    if (ptr)
      *ptr = 0;
    return SWIG_OK;
  }

  res = SWIG_ERROR;

  sobj = SWIG_Python_GetSwigThis(obj);
  if (own)
    *own = 0;
  while (sobj) {
    void *vptr = sobj->ptr;
    if (ty) {
      swig_type_info *to = sobj->ty;
      if (to == ty) {
        /* no type cast needed */
        if (ptr) *ptr = vptr;
        break;
      } else {
        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
        if (!tc) {
          sobj = (SwigPyObject *)sobj->next;
        } else {
          if (ptr) {
            int newmemory = 0;
            *ptr = SWIG_TypeCast(tc,vptr,&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;
            }
          }
          break;
        }
      }
    } else {
      if (ptr) *ptr = vptr;
      break;
    }
  }
  if (sobj) {
    if (own)
      *own = *own | sobj->own;
    if (flags & SWIG_POINTER_DISOWN) {
      sobj->own = 0;
    }
    res = SWIG_OK;
  } else {
    if (implicit_conv) {
      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
      if (data && !data->implicitconv) {
        PyObject *klass = data->klass;
        if (klass) {
          PyObject *impconv;
          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
          impconv = SWIG_Python_CallFunctor(klass, obj);
          data->implicitconv = 0;
          if (PyErr_Occurred()) {
            PyErr_Clear();
            impconv = 0;
          }
          if (impconv) {
            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
            if (iobj) {
              void *vptr;
              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
              if (SWIG_IsOK(res)) {
                if (ptr) {
                  *ptr = vptr;
                  /* transfer the ownership to 'ptr' */
                  iobj->own = 0;
                  res = SWIG_AddCast(res);
                  res = SWIG_AddNewMask(res);
                } else {
                  res = SWIG_AddCast(res);		    
                }
              }
            }
            Py_DECREF(impconv);
          }
        }
      }
    }
    if (!SWIG_IsOK(res) && obj == Py_None) {
      if (ptr)
        *ptr = 0;
      if (PyErr_Occurred())
        PyErr_Clear();
      res = SWIG_OK;
    }
  }
  return res;
}

/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  if (!PyCFunction_Check(obj)) {
    return SWIG_ConvertPtr(obj, ptr, ty, 0);
  } else {
    void *vptr = 0;
    
    /* here we get the method pointer for callbacks */
    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    if (desc)
      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    if (!desc) 
      return SWIG_ERROR;
    if (ty) {
      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
      if (tc) {
        int newmemory = 0;
        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
        assert(!newmemory); /* newmemory handling not yet implemented */
      } else {
        return SWIG_ERROR;
      }
    } else {
      *ptr = vptr;
    }
    return SWIG_OK;
  }
}

/* Convert a packed value value */

SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  if (!to) return SWIG_ERROR;
  if (ty) {
    if (to != ty) {
      /* check type cast? */
      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
      if (!tc) return SWIG_ERROR;
    }
  }
  return SWIG_OK;
}  

/* -----------------------------------------------------------------------------
 * Create a new pointer object
 * ----------------------------------------------------------------------------- */

/*
  Create a new instance object, without calling __init__, and set the
  'this' attribute.
*/

SWIGRUNTIME PyObject* 
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{
#if (PY_VERSION_HEX >= 0x02020000)
  PyObject *inst = 0;
  PyObject *newraw = data->newraw;
  if (newraw) {
    inst = PyObject_Call(newraw, data->newargs, NULL);
    if (inst) {
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
      PyObject **dictptr = _PyObject_GetDictPtr(inst);
      if (dictptr != NULL) {
	PyObject *dict = *dictptr;
	if (dict == NULL) {
	  dict = PyDict_New();
	  *dictptr = dict;
	  PyDict_SetItem(dict, SWIG_This(), swig_this);
	}
      }
#else
      PyObject *key = SWIG_This();
      PyObject_SetAttr(inst, key, swig_this);
#endif
    }
  } else {
#if PY_VERSION_HEX >= 0x03000000
    inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
    if (inst) {
      PyObject_SetAttr(inst, SWIG_This(), swig_this);
      Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
    }
#else
    PyObject *dict = PyDict_New();
    if (dict) {
      PyDict_SetItem(dict, SWIG_This(), swig_this);
      inst = PyInstance_NewRaw(data->newargs, dict);
      Py_DECREF(dict);
    }
#endif
  }
  return inst;
#else
#if (PY_VERSION_HEX >= 0x02010000)
  PyObject *inst = 0;
  PyObject *dict = PyDict_New();
  if (dict) {
    PyDict_SetItem(dict, SWIG_This(), swig_this);
    inst = PyInstance_NewRaw(data->newargs, dict);
    Py_DECREF(dict);
  }
  return (PyObject *) inst;
#else
  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
  if (inst == NULL) {
    return NULL;
  }
  inst->in_class = (PyClassObject *)data->newargs;
  Py_INCREF(inst->in_class);
  inst->in_dict = PyDict_New();
  if (inst->in_dict == NULL) {
    Py_DECREF(inst);
    return NULL;
  }
#ifdef Py_TPFLAGS_HAVE_WEAKREFS
  inst->in_weakreflist = NULL;
#endif
#ifdef Py_TPFLAGS_GC
  PyObject_GC_Init(inst);
#endif
  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
  return (PyObject *) inst;
#endif
#endif
}

SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{
 PyObject *dict;
#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
 PyObject **dictptr = _PyObject_GetDictPtr(inst);
 if (dictptr != NULL) {
   dict = *dictptr;
   if (dict == NULL) {
     dict = PyDict_New();
     *dictptr = dict;
   }
   PyDict_SetItem(dict, SWIG_This(), swig_this);
   return;
 }
#endif
 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
 PyDict_SetItem(dict, SWIG_This(), swig_this);
 Py_DECREF(dict);
} 


SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject *args) {
  PyObject *obj[2];
  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    return NULL;
  } else {
    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    if (sthis) {
      SwigPyObject_append((PyObject*) sthis, obj[1]);
    } else {
      SWIG_Python_SetSwigThis(obj[0], obj[1]);
    }
    return SWIG_Py_Void();
  }
}

/* Create a new pointer object */

SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  SwigPyClientData *clientdata;
  PyObject * robj;
  int own;

  if (!ptr)
    return SWIG_Py_Void();

  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  if (clientdata && clientdata->pytype) {
    SwigPyObject *newobj;
    if (flags & SWIG_BUILTIN_TP_INIT) {
      newobj = (SwigPyObject*) self;
      if (newobj->ptr) {
        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
        while (newobj->next)
	  newobj = (SwigPyObject *) newobj->next;
        newobj->next = next_self;
        newobj = (SwigPyObject *)next_self;
#ifdef SWIGPYTHON_BUILTIN
        newobj->dict = 0;
#endif
      }
    } else {
      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
#ifdef SWIGPYTHON_BUILTIN
      newobj->dict = 0;
#endif
    }
    if (newobj) {
      newobj->ptr = ptr;
      newobj->ty = type;
      newobj->own = own;
      newobj->next = 0;
      return (PyObject*) newobj;
    }
    return SWIG_Py_Void();
  }

  assert(!(flags & SWIG_BUILTIN_TP_INIT));

  robj = SwigPyObject_New(ptr, type, own);
  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    Py_DECREF(robj);
    robj = inst;
  }
  return robj;
}

/* Create a new packed object */

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
}

/* -----------------------------------------------------------------------------*
 *  Get type list 
 * -----------------------------------------------------------------------------*/

#ifdef SWIG_LINK_RUNTIME
void *SWIG_ReturnGlobalTypeList(void *);
#endif

SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  static void *type_pointer = (void *)0;
  /* first check if module already created */
  if (!type_pointer) {
#ifdef SWIG_LINK_RUNTIME
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
#else
# ifdef SWIGPY_USE_CAPSULE
    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
# else
    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
# endif
    if (PyErr_Occurred()) {
      PyErr_Clear();
      type_pointer = (void *)0;
    }
#endif
  }
  return (swig_module_info *) type_pointer;
}

#if PY_MAJOR_VERSION < 2
/* PyModule_AddObject function was introduced in Python 2.0.  The following function
   is copied out of Python/modsupport.c in python version 2.3.4 */
SWIGINTERN int
PyModule_AddObject(PyObject *m, char *name, PyObject *o)
{
  PyObject *dict;
  if (!PyModule_Check(m)) {
    PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
    return SWIG_ERROR;
  }
  if (!o) {
    PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
    return SWIG_ERROR;
  }
  
  dict = PyModule_GetDict(m);
  if (dict == NULL) {
    /* Internal error -- modules must have a dict! */
    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
		 PyModule_GetName(m));
    return SWIG_ERROR;
  }
  if (PyDict_SetItemString(dict, name, o))
    return SWIG_ERROR;
  Py_DECREF(o);
  return SWIG_OK;
}
#endif

SWIGRUNTIME void
#ifdef SWIGPY_USE_CAPSULE
SWIG_Python_DestroyModule(PyObject *obj)
#else
SWIG_Python_DestroyModule(void *vptr)
#endif
{
#ifdef SWIGPY_USE_CAPSULE
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
#else
  swig_module_info *swig_module = (swig_module_info *) vptr;
#endif
  swig_type_info **types = swig_module->types;
  size_t i;
  for (i =0; i < swig_module->size; ++i) {
    swig_type_info *ty = types[i];
    if (ty->owndata) {
      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
      if (data) SwigPyClientData_Del(data);
    }
  }
  Py_DECREF(SWIG_This());
  swig_this = NULL;
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000
 /* Add a dummy module object into sys.modules */
  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
#else
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif
#ifdef SWIGPY_USE_CAPSULE
  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
#else
  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
#endif
}

/* The python cached type query */
SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void) {
  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  return cache;
}

SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char *type)
{
  PyObject *cache = SWIG_Python_TypeCache();
  PyObject *key = SWIG_Python_str_FromChar(type); 
  PyObject *obj = PyDict_GetItem(cache, key);
  swig_type_info *descriptor;
  if (obj) {
#ifdef SWIGPY_USE_CAPSULE
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
#else
    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif
  } else {
    swig_module_info *swig_module = SWIG_GetModule(0);
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE
      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
#else
      obj = PyCObject_FromVoidPtr(descriptor, NULL);
#endif
      PyDict_SetItem(cache, key, obj);
      Py_DECREF(obj);
    }
  }
  Py_DECREF(key);
  return descriptor;
}

/* 
   For backward compatibility only
*/
#define SWIG_POINTER_EXCEPTION  0
#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)

SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char* mesg, int infront)
{  
  if (PyErr_Occurred()) {
    PyObject *type = 0;
    PyObject *value = 0;
    PyObject *traceback = 0;
    PyErr_Fetch(&type, &value, &traceback);
    if (value) {
      char *tmp;
      PyObject *old_str = PyObject_Str(value);
      Py_XINCREF(type);
      PyErr_Clear();
      if (infront) {
	PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
      } else {
	PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
      }
      SWIG_Python_str_DelForPy3(tmp);
      Py_DECREF(old_str);
    }
    return 1;
  } else {
    return 0;
  }
}
  
SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)
{
  if (PyErr_Occurred()) {
    /* add information about failing argument */
    char mesg[256];
    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
    return SWIG_Python_AddErrMesg(mesg, 1);
  } else {
    return 0;
  }
}

SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject *self)
{
  SwigPyObject *v = (SwigPyObject *)self;
  swig_type_info *ty = v ? v->ty : 0;
  return ty ? ty->str : "";
}

SWIGRUNTIME void
SWIG_Python_TypeError(const char *type, PyObject *obj)
{
  if (type) {
#if defined(SWIG_COBJECT_TYPES)
    if (obj && SwigPyObject_Check(obj)) {
      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
      if (otype) {
	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
		     type, otype);
	return;
      }
    } else 
#endif      
    {
      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
      if (otype) {
	PyObject *str = PyObject_Str(obj);
	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
	if (cstr) {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
		       type, otype, cstr);
          SWIG_Python_str_DelForPy3(cstr);
	} else {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
		       type, otype);
	}
	Py_XDECREF(str);
	return;
      }
    }   
    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  } else {
    PyErr_Format(PyExc_TypeError, "unexpected type is received");
  }
}


/* Convert a pointer value, signal an exception on a type mismatch */
SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  void *result;
  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    PyErr_Clear();
#if SWIG_POINTER_EXCEPTION
    if (flags) {
      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
      SWIG_Python_ArgFail(argnum);
    }
#endif
  }
  return result;
}

#ifdef SWIGPYTHON_BUILTIN
SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  PyTypeObject *tp = obj->ob_type;
  PyObject *descr;
  PyObject *encoded_name;
  descrsetfunc f;
  int res = -1;

# ifdef Py_USING_UNICODE
  if (PyString_Check(name)) {
    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
    if (!name)
      return -1;
  } else if (!PyUnicode_Check(name))
# else
  if (!PyString_Check(name))
# endif
  {
    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
    return -1;
  } else {
    Py_INCREF(name);
  }

  if (!tp->tp_dict) {
    if (PyType_Ready(tp) < 0)
      goto done;
  }

  descr = _PyType_Lookup(tp, name);
  f = NULL;
  if (descr != NULL)
    f = descr->ob_type->tp_descr_set;
  if (!f) {
    if (PyString_Check(name)) {
      encoded_name = name;
      Py_INCREF(name);
    } else {
      encoded_name = PyUnicode_AsUTF8String(name);
    }
    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
    Py_DECREF(encoded_name);
  } else {
    res = f(descr, obj, value);
  }
  
  done:
  Py_DECREF(name);
  return res;
}
#endif


#ifdef __cplusplus
}
#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_MatrixXb swig_types[0]
#define SWIGTYPE_p_MatrixXd swig_types[1]
#define SWIGTYPE_p_MatrixXdChol swig_types[2]
#define SWIGTYPE_p_MatrixXi swig_types[3]
#define SWIGTYPE_p_PCVoid swig_types[4]
#define SWIGTYPE_p_PMatrixXd swig_types[5]
#define SWIGTYPE_p_PVectorXi swig_types[6]
#define SWIGTYPE_p_VectorXd swig_types[7]
#define SWIGTYPE_p_VectorXi swig_types[8]
#define SWIGTYPE_p_allocator_type swig_types[9]
#define SWIGTYPE_p_char swig_types[10]
#define SWIGTYPE_p_difference_type swig_types[11]
#define SWIGTYPE_p_double swig_types[12]
#define SWIGTYPE_p_float swig_types[13]
#define SWIGTYPE_p_int swig_types[14]
#define SWIGTYPE_p_key_type swig_types[15]
#define SWIGTYPE_p_limix__ACovarianceFunction swig_types[16]
#define SWIGTYPE_p_limix__ADataTerm swig_types[17]
#define SWIGTYPE_p_limix__AGenotypeContainer swig_types[18]
#define SWIGTYPE_p_limix__ALMM swig_types[19]
#define SWIGTYPE_p_limix__ALikelihood swig_types[20]
#define SWIGTYPE_p_limix__AMultiCF swig_types[21]
#define SWIGTYPE_p_limix__ARDataFrameT_MatrixXd_t swig_types[22]
#define SWIGTYPE_p_limix__AVarianceTerm swig_types[23]
#define SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t swig_types[24]
#define SWIGTYPE_p_limix__CCovLinearARD swig_types[25]
#define SWIGTYPE_p_limix__CCovLinearISO swig_types[26]
#define SWIGTYPE_p_limix__CCovLinearISODelta swig_types[27]
#define SWIGTYPE_p_limix__CCovSqexpARD swig_types[28]
#define SWIGTYPE_p_limix__CCovarianceFunctionCacheOld swig_types[29]
#define SWIGTYPE_p_limix__CData swig_types[30]
#define SWIGTYPE_p_limix__CDiagonalCF swig_types[31]
#define SWIGTYPE_p_limix__CFixedCF swig_types[32]
#define SWIGTYPE_p_limix__CFixedDiagonalCF swig_types[33]
#define SWIGTYPE_p_limix__CFreeFormCF swig_types[34]
#define SWIGTYPE_p_limix__CGPCholCache swig_types[35]
#define SWIGTYPE_p_limix__CGPHyperParams swig_types[36]
#define SWIGTYPE_p_limix__CGPKroneckerCache swig_types[37]
#define SWIGTYPE_p_limix__CGPSum swig_types[38]
#define SWIGTYPE_p_limix__CGPSumCache swig_types[39]
#define SWIGTYPE_p_limix__CGPbase swig_types[40]
#define SWIGTYPE_p_limix__CGPkronSum swig_types[41]
#define SWIGTYPE_p_limix__CGPkronSumCache swig_types[42]
#define SWIGTYPE_p_limix__CGPkronecker swig_types[43]
#define SWIGTYPE_p_limix__CGPopt swig_types[44]
#define SWIGTYPE_p_limix__CGenotypeBlock swig_types[45]
#define SWIGTYPE_p_limix__CHeaderMap swig_types[46]
#define SWIGTYPE_p_limix__CInteractLMM swig_types[47]
#define SWIGTYPE_p_limix__CKroneckerCF swig_types[48]
#define SWIGTYPE_p_limix__CKroneckerLMM swig_types[49]
#define SWIGTYPE_p_limix__CKroneckerMean swig_types[50]
#define SWIGTYPE_p_limix__CLMM swig_types[51]
#define SWIGTYPE_p_limix__CLMMCore swig_types[52]
#define SWIGTYPE_p_limix__CLMMKroneckerCore swig_types[53]
#define SWIGTYPE_p_limix__CLikNormalIso swig_types[54]
#define SWIGTYPE_p_limix__CLikNormalNULL swig_types[55]
#define SWIGTYPE_p_limix__CLikNormalSVD swig_types[56]
#define SWIGTYPE_p_limix__CLimixException swig_types[57]
#define SWIGTYPE_p_limix__CLinCombCF swig_types[58]
#define SWIGTYPE_p_limix__CLinearMean swig_types[59]
#define SWIGTYPE_p_limix__CLowRankCF swig_types[60]
#define SWIGTYPE_p_limix__CMemGenotypeContainer swig_types[61]
#define SWIGTYPE_p_limix__CMultiTraitTerm swig_types[62]
#define SWIGTYPE_p_limix__CNamedCache swig_types[63]
#define SWIGTYPE_p_limix__CParamObject swig_types[64]
#define SWIGTYPE_p_limix__CPolyCF swig_types[65]
#define SWIGTYPE_p_limix__CProductCF swig_types[66]
#define SWIGTYPE_p_limix__CRMemDataFrameT_MatrixXd_t swig_types[67]
#define SWIGTYPE_p_limix__CRWMemDataFrameT_MatrixXd_t swig_types[68]
#define SWIGTYPE_p_limix__CRank1diagCF swig_types[69]
#define SWIGTYPE_p_limix__CRankOneCF swig_types[70]
#define SWIGTYPE_p_limix__CSingleTraitTerm swig_types[71]
#define SWIGTYPE_p_limix__CSqExpCF swig_types[72]
#define SWIGTYPE_p_limix__CSumCF swig_types[73]
#define SWIGTYPE_p_limix__CSumLinear swig_types[74]
#define SWIGTYPE_p_limix__CTextfileGenotypeContainer swig_types[75]
#define SWIGTYPE_p_limix__CVarianceDecomposition swig_types[76]
#define SWIGTYPE_p_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t swig_types[77]
#define SWIGTYPE_p_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t swig_types[78]
#define SWIGTYPE_p_limix__nLLevalFunctor swig_types[79]
#define SWIGTYPE_p_limix__nLLevalKronFunctor swig_types[80]
#define SWIGTYPE_p_long_long swig_types[81]
#define SWIGTYPE_p_mapped_type swig_types[82]
#define SWIGTYPE_p_p_PyObject swig_types[83]
#define SWIGTYPE_p_short swig_types[84]
#define SWIGTYPE_p_signed_char swig_types[85]
#define SWIGTYPE_p_size_type swig_types[86]
#define SWIGTYPE_p_std__allocatorT_MatrixXd_t swig_types[87]
#define SWIGTYPE_p_std__allocatorT_VectorXi_t swig_types[88]
#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t swig_types[89]
#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[90]
#define SWIGTYPE_p_std__exception swig_types[91]
#define SWIGTYPE_p_std__invalid_argument swig_types[92]
#define SWIGTYPE_p_std__lessT_std__string_t swig_types[93]
#define SWIGTYPE_p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t swig_types[94]
#define SWIGTYPE_p_std__mapT_std__string_PCVoid_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_PCVoid_t_t_t swig_types[95]
#define SWIGTYPE_p_std__shared_ptrT_MatrixXd_t swig_types[96]
#define SWIGTYPE_p_std__shared_ptrT_bool_t swig_types[97]
#define SWIGTYPE_p_std__shared_ptrT_bost__enable_shared_from_thisT_CGPbase_t_t swig_types[98]
#define SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t swig_types[99]
#define SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t swig_types[100]
#define SWIGTYPE_p_std__shared_ptrT_limix__AGenotypeContainer_t swig_types[101]
#define SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t swig_types[102]
#define SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t swig_types[103]
#define SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t swig_types[104]
#define SWIGTYPE_p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t swig_types[105]
#define SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t swig_types[106]
#define SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t swig_types[107]
#define SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISODelta_t swig_types[108]
#define SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t swig_types[109]
#define SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t swig_types[110]
#define SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t swig_types[111]
#define SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCache_t swig_types[112]
#define SWIGTYPE_p_std__shared_ptrT_limix__CData_t swig_types[113]
#define SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t swig_types[114]
#define SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t swig_types[115]
#define SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t swig_types[116]
#define SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t swig_types[117]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t swig_types[118]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t swig_types[119]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t swig_types[120]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPLMM_t swig_types[121]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t swig_types[122]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t swig_types[123]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t swig_types[124]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t swig_types[125]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t swig_types[126]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t swig_types[127]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t swig_types[128]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGPvarDecomp_t swig_types[129]
#define SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t swig_types[130]
#define SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t swig_types[131]
#define SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t swig_types[132]
#define SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t swig_types[133]
#define SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t swig_types[134]
#define SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t swig_types[135]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLMMCore_t swig_types[136]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLMMKroneckerCore_t swig_types[137]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t swig_types[138]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t swig_types[139]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t swig_types[140]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t swig_types[141]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t swig_types[142]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t swig_types[143]
#define SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t swig_types[144]
#define SWIGTYPE_p_std__shared_ptrT_limix__CMemGenotypeContainer_t swig_types[145]
#define SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t swig_types[146]
#define SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitVQTL_t swig_types[147]
#define SWIGTYPE_p_std__shared_ptrT_limix__CNamedCache_t swig_types[148]
#define SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t swig_types[149]
#define SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t swig_types[150]
#define SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t swig_types[151]
#define SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t swig_types[152]
#define SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t swig_types[153]
#define SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t swig_types[154]
#define SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t swig_types[155]
#define SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t swig_types[156]
#define SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t swig_types[157]
#define SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t swig_types[158]
#define SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t swig_types[159]
#define SWIGTYPE_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t swig_types[160]
#define SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t swig_types[161]
#define SWIGTYPE_p_std__shared_ptrT_limix__CVqtl_t swig_types[162]
#define SWIGTYPE_p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t_t swig_types[163]
#define SWIGTYPE_p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t_t swig_types[164]
#define SWIGTYPE_p_std__shared_ptrT_limix__stringVec_t swig_types[165]
#define SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t swig_types[166]
#define SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t swig_types[167]
#define SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t swig_types[168]
#define SWIGTYPE_p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t swig_types[169]
#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_bool_t_std__allocatorT_std__shared_ptrT_bool_t_t_t swig_types[170]
#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t swig_types[171]
#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__AVarianceTerm_t_std__allocatorT_std__shared_ptrT_limix__AVarianceTerm_t_t_t swig_types[172]
#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__CLinearMean_t_std__allocatorT_std__shared_ptrT_limix__CLinearMean_t_t_t swig_types[173]
#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[174]
#define SWIGTYPE_p_swig__SwigPyIterator swig_types[175]
#define SWIGTYPE_p_unsigned_char swig_types[176]
#define SWIGTYPE_p_unsigned_int swig_types[177]
#define SWIGTYPE_p_unsigned_long_long swig_types[178]
#define SWIGTYPE_p_unsigned_short swig_types[179]
#define SWIGTYPE_p_value_type swig_types[180]
static swig_type_info *swig_types[182];
static swig_module_info swig_module = {swig_types, 181, 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) -------- */

#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
#  error "This python version requires swig to be run with the '-classic' option"
# endif
#endif

/*-----------------------------------------------
              @(target):= _core.so
  ------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_init    PyInit__core

#else
#  define SWIG_init    init_core

#endif
#define SWIG_name    "_core"

#define SWIGVERSION 0x030008 
#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>


namespace swig {
  class SwigPtr_PyObject {
  protected:
    PyObject *_obj;

  public:
    SwigPtr_PyObject() :_obj(0)
    {
    }

    SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XINCREF(_obj);      
      SWIG_PYTHON_THREAD_END_BLOCK;
    }
    
    SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    {
      if (initial_ref) {
        SWIG_PYTHON_THREAD_BEGIN_BLOCK;
        Py_XINCREF(_obj);
        SWIG_PYTHON_THREAD_END_BLOCK;
      }
    }
    
    SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XINCREF(item._obj);
      Py_XDECREF(_obj);
      _obj = item._obj;
      SWIG_PYTHON_THREAD_END_BLOCK;
      return *this;      
    }
    
    ~SwigPtr_PyObject() 
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XDECREF(_obj);
      SWIG_PYTHON_THREAD_END_BLOCK;
    }
    
    operator PyObject *() const
    {
      return _obj;
    }

    PyObject *operator->() const
    {
      return _obj;
    }
  };
}


namespace swig {
  struct SwigVar_PyObject : SwigPtr_PyObject {
    SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    
    SwigVar_PyObject & operator = (PyObject* obj)
    {
      Py_XDECREF(_obj);
      _obj = obj;
      return *this;      
    }
  };
}


#define SWIG_FILE_WITH_INIT
#define SWIG
#include "limix/types.h"
#include "limix/covar/covariance.h"
#include "limix/utils/cache.h"
#include "limix/covar/linear.h"
#include "limix/covar/freeform.h"
#include "limix/covar/se.h"
#include "limix/covar/combinators.h"	
#include "limix/likelihood/likelihood.h"
#include "limix/mean/ADataTerm.h"
#include "limix/mean/CData.h"
#include "limix/mean/CLinearMean.h"
#include "limix/mean/CSumLinear.h"
#include "limix/mean/CKroneckerMean.h"
#include "limix/gp/gp_base.h"
#include "limix/gp/gp_kronecker.h"
#include "limix/gp/gp_kronSum.h"
#include "limix/gp/gp_Sum.h"
#include "limix/gp/gp_opt.h"
#include "limix/LMM/lmm.h"
#include "limix/LMM/kronecker_lmm.h"
#include "limix/modules/CVarianceDecomposition.h"
#include "limix/io/dataframe.h"
#include "limix/io/genotype.h"
#include "limix/LMM_forest/lmm_forest.h"

using namespace limix;
//  removed namespace bindings (12.02.12)


#ifndef SWIG_FILE_WITH_INIT
#define NO_IMPORT_ARRAY
#endif
#include "stdio.h"
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/arrayobject.h>


SWIGINTERNINLINE PyObject*
  SWIG_From_int  (int value)
{
  return PyInt_FromLong((long) value);
}


#include <iostream>

#if PY_VERSION_HEX >= 0x03020000
# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
#else
# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
#endif


#include <stdexcept>


#if defined(__GNUC__)
#  if __GNUC__ == 2 && __GNUC_MINOR <= 96
#     define SWIG_STD_NOMODERN_STL
#  endif
#endif


#include <string>


#include <stddef.h>


namespace swig {
  struct stop_iteration {
  };

  struct SwigPyIterator {
  private:
    SwigPtr_PyObject _seq;

  protected:
    SwigPyIterator(PyObject *seq) : _seq(seq)
    {
    }
      
  public:
    virtual ~SwigPyIterator() {}

    // Access iterator method, required by Python
    virtual PyObject *value() const = 0;

    // Forward iterator method, required by Python
    virtual SwigPyIterator *incr(size_t n = 1) = 0;
    
    // Backward iterator method, very common in C++, but not required in Python
    virtual SwigPyIterator *decr(size_t /*n*/ = 1)
    {
      throw stop_iteration();
    }

    // Random access iterator methods, but not required in Python
    virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
    {
      throw std::invalid_argument("operation not supported");
    }

    virtual bool equal (const SwigPyIterator &/*x*/) const
    {
      throw std::invalid_argument("operation not supported");
    }
    
    // C++ common/needed methods
    virtual SwigPyIterator *copy() const = 0;

    PyObject *next()     
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads       
      PyObject *obj = value();
      incr();       
      SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
      return obj;     
    }

    /* Make an alias for Python 3.x */
    PyObject *__next__()
    {
      return next();
    }

    PyObject *previous()
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads       
      decr();
      PyObject *obj = value();
      SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads       
      return obj;
    }

    SwigPyIterator *advance(ptrdiff_t n)
    {
      return  (n > 0) ?  incr(n) : decr(-n);
    }
      
    bool operator == (const SwigPyIterator& x)  const
    {
      return equal(x);
    }
      
    bool operator != (const SwigPyIterator& x) const
    {
      return ! operator==(x);
    }
      
    SwigPyIterator& operator += (ptrdiff_t n)
    {
      return *advance(n);
    }

    SwigPyIterator& operator -= (ptrdiff_t n)
    {
      return *advance(-n);
    }
      
    SwigPyIterator* operator + (ptrdiff_t n) const
    {
      return copy()->advance(n);
    }

    SwigPyIterator* operator - (ptrdiff_t n) const
    {
      return copy()->advance(-n);
    }
      
    ptrdiff_t operator - (const SwigPyIterator& x) const
    {
      return x.distance(*this);
    }
      
    static swig_type_info* descriptor() {
      static int init = 0;
      static swig_type_info* desc = 0;
      if (!init) {
	desc = SWIG_TypeQuery("swig::SwigPyIterator *");
	init = 1;
      }	
      return desc;
    }    
  };

#if defined(SWIGPYTHON_BUILTIN)
  inline PyObject* make_output_iterator_builtin (PyObject *pyself)
  {
    Py_INCREF(pyself);
    return pyself;
  }
#endif
}


SWIGINTERN int
SWIG_AsVal_double (PyObject *obj, double *val)
{
  int res = SWIG_TypeError;
  if (PyFloat_Check(obj)) {
    if (val) *val = PyFloat_AsDouble(obj);
    return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000
  } else if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
#endif
  } else if (PyLong_Check(obj)) {
    double v = PyLong_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    double d = PyFloat_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = d;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      long v = PyLong_AsLong(obj);
      if (!PyErr_Occurred()) {
	if (val) *val = v;
	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
      } else {
	PyErr_Clear();
      }
    }
  }
#endif
  return res;
}


#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_unsigned_SS_long (PyObject *obj, unsigned long *val) 
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    long v = PyInt_AsLong(obj);
    if (v >= 0) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else
#endif
  if (PyLong_Check(obj)) {
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


SWIGINTERNINLINE int
SWIG_AsVal_size_t (PyObject * obj, size_t *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  return res;
}


  #define SWIG_From_long   PyLong_FromLong 


SWIGINTERNINLINE PyObject *
SWIG_From_ptrdiff_t  (ptrdiff_t value)
{    
  return SWIG_From_long  (static_cast< long >(value));
}


SWIGINTERNINLINE PyObject*
  SWIG_From_bool  (bool value)
{
  return PyBool_FromLong(value ? 1 : 0);
}


SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else
#endif
  if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    long v = PyInt_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


SWIGINTERNINLINE int
SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, val ? &v : 0);
  if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
  return res;
}


#include <algorithm>


#include <vector>


#include <utility>


#include <map>


#include <algorithm>


#include <stdint.h>		// Use the C99 official header


namespace swig {
  template <class Type>
  struct noconst_traits {
    typedef Type noconst_type;
  };

  template <class Type>
  struct noconst_traits<const Type> {
    typedef Type noconst_type;
  };

  /*
    type categories
  */
  struct pointer_category { };
  struct value_category { };

  /*
    General traits that provides type_name and type_info
  */
  template <class Type> struct traits { };

  template <class Type>
  inline const char* type_name() {
    return traits<typename noconst_traits<Type >::noconst_type >::type_name();
  }

  template <class Type>
  struct traits_info {
    static swig_type_info *type_query(std::string name) {
      name += " *";
      return SWIG_TypeQuery(name.c_str());
    }
    static swig_type_info *type_info() {
      static swig_type_info *info = type_query(type_name<Type>());
      return info;
    }
  };

  template <class Type>
  inline swig_type_info *type_info() {
    return traits_info<Type>::type_info();
  }

  /*
    Partial specialization for pointers
  */
  template <class Type> struct traits <Type *> {
    typedef pointer_category category;
    static std::string make_ptr_name(const char* name) {
      std::string ptrname = name;
      ptrname += " *";
      return ptrname;
    }
    static const char* type_name() {
      static std::string name = make_ptr_name(swig::type_name<Type>());
      return name.c_str();
    }
  };

  template <class Type, class Category>
  struct traits_as { };

  template <class Type, class Category>
  struct traits_check { };

}


namespace swig {  
  /*
    Traits that provides the from method
  */
  template <class Type> struct traits_from_ptr {
    static PyObject *from(Type *val, int owner = 0) {
      return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner);
    }
  };

  template <class Type> struct traits_from {
    static PyObject *from(const Type& val) {
      return traits_from_ptr<Type>::from(new Type(val), 1);
    }
  };

  template <class Type> struct traits_from<Type *> {
    static PyObject *from(Type* val) {
      return traits_from_ptr<Type>::from(val, 0);
    }
  };

  template <class Type> struct traits_from<const Type *> {
    static PyObject *from(const Type* val) {
      return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
    }
  };


  template <class Type>
  inline PyObject *from(const Type& val) {
    return traits_from<Type>::from(val);
  }

  template <class Type>
  inline PyObject *from_ptr(Type* val, int owner) {
    return traits_from_ptr<Type>::from(val, owner);
  }

  /*
    Traits that provides the asval/as/check method
  */
  template <class Type>
  struct traits_asptr {   
    static int asptr(PyObject *obj, Type **val) {
      Type *p;
      int res = SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0);
      if (SWIG_IsOK(res)) {
	if (val) *val = p;
      }
      return res;
    }
  }; 

  template <class Type>
  inline int asptr(PyObject *obj, Type **vptr) {
    return traits_asptr<Type>::asptr(obj, vptr);
  }

  template <class Type> 
  struct traits_asval {
    static int asval(PyObject *obj, Type *val) {
      if (val) {
	Type *p = 0;
	int res = traits_asptr<Type>::asptr(obj, &p);
	if (!SWIG_IsOK(res)) return res;	
	if (p) {
	  typedef typename noconst_traits<Type>::noconst_type noconst_type;
	  *(const_cast<noconst_type*>(val)) = *p;
	  if (SWIG_IsNewObj(res)){
	    delete p;
	    res = SWIG_DelNewMask(res);
	  }
	  return res;
	} else {
	  return SWIG_ERROR;
	}
      } else {
	return traits_asptr<Type>::asptr(obj, (Type **)(0));
      }
    }
  };

  template <class Type> struct traits_asval<Type*> {
    static int asval(PyObject *obj, Type **val) {
      if (val) {
        typedef typename noconst_traits<Type>::noconst_type noconst_type;
        noconst_type *p = 0;
        int res = traits_asptr<noconst_type>::asptr(obj,  &p);
        if (SWIG_IsOK(res)) {
          *(const_cast<noconst_type**>(val)) = p;
	}
	return res;
      } else {
	return traits_asptr<Type>::asptr(obj, (Type **)(0));
      }
    }
  };
  
  template <class Type>
  inline int asval(PyObject *obj, Type *val) {
    return traits_asval<Type>::asval(obj, val);
  }

  template <class Type> 
  struct traits_as<Type, value_category> {
    static Type as(PyObject *obj, bool throw_error) {
      Type v;
      int res = asval(obj, &v);
      if (!obj || !SWIG_IsOK(res)) {
	if (!PyErr_Occurred()) {
	  ::SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
	}
	if (throw_error) throw std::invalid_argument("bad type");
      }
      return v;
    }
  };

  template <class Type> 
  struct traits_as<Type, pointer_category> {
    static Type as(PyObject *obj, bool throw_error) {
      Type *v = 0;      
      int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
      if (SWIG_IsOK(res) && v) {
	if (SWIG_IsNewObj(res)) {
	  Type r(*v);
	  delete v;
	  return r;
	} else {
	  return *v;
	}
      } else {
	// Uninitialized return value, no Type() constructor required.
	static Type *v_def = (Type*) malloc(sizeof(Type));
	if (!PyErr_Occurred()) {
	  SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
	}
	if (throw_error) throw std::invalid_argument("bad type");
	memset(v_def,0,sizeof(Type));
	return *v_def;
      }
    }
  };

  template <class Type> 
  struct traits_as<Type*, pointer_category> {
    static Type* as(PyObject *obj, bool throw_error) {
      Type *v = 0;      
      int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
      if (SWIG_IsOK(res)) {
	return v;
      } else {
	if (!PyErr_Occurred()) {
	  SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
	}
	if (throw_error) throw std::invalid_argument("bad type");
	return 0;
      }
    }
  };
    
  template <class Type>
  inline Type as(PyObject *obj, bool te = false) {
    return traits_as<Type, typename traits<Type>::category>::as(obj, te);
  }

  template <class Type> 
  struct traits_check<Type, value_category> {
    static bool check(PyObject *obj) {
      int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
      return SWIG_IsOK(res) ? true : false;
    }
  };

  template <class Type> 
  struct traits_check<Type, pointer_category> {
    static bool check(PyObject *obj) {
      int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
      return SWIG_IsOK(res) ? true : false;
    }
  };

  template <class Type>
  inline bool check(PyObject *obj) {
    return traits_check<Type, typename traits<Type>::category>::check(obj);
  }
}


#include <functional>

namespace std {
  template <>
  struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
  {
    bool
    operator()(PyObject * v, PyObject *w) const
    { 
      bool res;
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
      /* This may fall into a case of inconsistent
               eg. ObjA > ObjX > ObjB
               but ObjA < ObjB
      */
      if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
      {
        /* Objects can't be compared, this mostly occurred in Python 3.0 */
        /* Compare their ptr directly for a workaround */
        res = (v < w);
        PyErr_Clear();
      }
      SWIG_PYTHON_THREAD_END_BLOCK;
      return res;
    }
  };

  template <>
  struct less <swig::SwigPtr_PyObject>: public binary_function<swig::SwigPtr_PyObject, swig::SwigPtr_PyObject, bool>
  {
    bool
    operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
    {
      return std::less<PyObject *>()(v, w);
    }
  };

  template <>
  struct less <swig::SwigVar_PyObject>: public binary_function<swig::SwigVar_PyObject, swig::SwigVar_PyObject, bool>
  {
    bool
    operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
    {
      return std::less<PyObject *>()(v, w);
    }
  };

}

namespace swig {
  template <> struct traits<PyObject *> {
    typedef value_category category;
    static const char* type_name() { return "PyObject *"; }
  };  

  template <>  struct traits_asval<PyObject * > {   
    typedef PyObject * value_type;
    static int asval(PyObject *obj, value_type *val) {
      if (val) *val = obj;
      return SWIG_OK;
    }
  };

  template <> 
  struct traits_check<PyObject *, value_category> {
    static bool check(PyObject *) {
      return true;
    }
  };

  template <>  struct traits_from<PyObject *> {
    typedef PyObject * value_type;
    static PyObject *from(const value_type& val) {
      Py_XINCREF(val);
      return val;
    }
  };
  
}

namespace swig {
  template <class Difference>
  inline size_t
  check_index(Difference i, size_t size, bool insert = false) {
    if ( i < 0 ) {
      if ((size_t) (-i) <= size)
	return (size_t) (i + size);
    } else if ( (size_t) i < size ) {
      return (size_t) i;
    } else if (insert && ((size_t) i == size)) {
      return size;
    }
    throw std::out_of_range("index out of range");
  }

  template <class Difference>
  void
  slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
    if (step == 0) {
      throw std::invalid_argument("slice step cannot be zero");
    } else if (step > 0) {
      // Required range: 0 <= i < size, 0 <= j < size
      if (i < 0) {
        ii = 0;
      } else if (i < (Difference)size) {
        ii = i;
      } else if (insert && (i >= (Difference)size)) {
        ii = (Difference)size;
      }
      if ( j < 0 ) {
        jj = 0;
      } else {
        jj = (j < (Difference)size) ? j : (Difference)size;
      }
    } else {
      // Required range: -1 <= i < size-1, -1 <= j < size-1
      if (i < -1) {
        ii = -1;
      } else if (i < (Difference) size) {
        ii = i;
      } else if (i >= (Difference)(size-1)) {
        ii = (Difference)(size-1);
      }
      if (j < -1) {
        jj = -1;
      } else {
        jj = (j < (Difference)size ) ? j : (Difference)(size-1);
      }
    }
  }

  template <class Sequence, class Difference>
  inline typename Sequence::iterator
  getpos(Sequence* self, Difference i)  {
    typename Sequence::iterator pos = self->begin();
    std::advance(pos, check_index(i,self->size()));
    return pos;
  }

  template <class Sequence, class Difference>
  inline typename Sequence::const_iterator
  cgetpos(const Sequence* self, Difference i)  {
    typename Sequence::const_iterator pos = self->begin();
    std::advance(pos, check_index(i,self->size()));
    return pos;
  }

  template <class Sequence>
  inline void
  erase(Sequence* seq, const typename Sequence::iterator& position) {
    seq->erase(position);
  }

  template <class Sequence, class Difference>
  inline Sequence*
  getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
    typename Sequence::size_type size = self->size();
    Difference ii = 0;
    Difference jj = 0;
    swig::slice_adjust(i, j, step, size, ii, jj);

    if (step > 0) {
      typename Sequence::const_iterator sb = self->begin();
      typename Sequence::const_iterator se = self->begin();
      std::advance(sb,ii);
      std::advance(se,jj);
      if (step == 1) {
        return new Sequence(sb, se);
      } else {
        Sequence *sequence = new Sequence();
        typename Sequence::const_iterator it = sb;
        while (it!=se) {
          sequence->push_back(*it);
          for (Py_ssize_t c=0; c<step && it!=se; ++c)
            it++;
        }
        return sequence;
      } 
    } else {
      Sequence *sequence = new Sequence();
      if (ii > jj) {
        typename Sequence::const_reverse_iterator sb = self->rbegin();
        typename Sequence::const_reverse_iterator se = self->rbegin();
        std::advance(sb,size-ii-1);
        std::advance(se,size-jj-1);
        typename Sequence::const_reverse_iterator it = sb;
        while (it!=se) {
          sequence->push_back(*it);
          for (Py_ssize_t c=0; c<-step && it!=se; ++c)
            it++;
        }
      }
      return sequence;
    }
  }

  template <class Sequence, class Difference, class InputSeq>
  inline void
  setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
    typename Sequence::size_type size = self->size();
    Difference ii = 0;
    Difference jj = 0;
    swig::slice_adjust(i, j, step, size, ii, jj, true);
    if (step > 0) {
      if (jj < ii)
        jj = ii;
      if (step == 1) {
        size_t ssize = jj - ii;
        if (ssize <= is.size()) {
          // expanding/staying the same size
          typename Sequence::iterator sb = self->begin();
          typename InputSeq::const_iterator isit = is.begin();
          std::advance(sb,ii);
          std::advance(isit, jj - ii);
          self->insert(std::copy(is.begin(), isit, sb), isit, is.end());
        } else {
          // shrinking
          typename Sequence::iterator sb = self->begin();
          typename Sequence::iterator se = self->begin();
          std::advance(sb,ii);
          std::advance(se,jj);
          self->erase(sb,se);
          sb = self->begin();
          std::advance(sb,ii);
          self->insert(sb, is.begin(), is.end());
        }
      } else {
        size_t replacecount = (jj - ii + step - 1) / step;
        if (is.size() != replacecount) {
          char msg[1024];
          sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
          throw std::invalid_argument(msg);
        }
        typename Sequence::const_iterator isit = is.begin();
        typename Sequence::iterator it = self->begin();
        std::advance(it,ii);
        for (size_t rc=0; rc<replacecount; ++rc) {
          *it++ = *isit++;
          for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
            it++;
        }
      }
    } else {
      if (jj > ii)
        jj = ii;
      size_t replacecount = (ii - jj - step - 1) / -step;
      if (is.size() != replacecount) {
        char msg[1024];
        sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
        throw std::invalid_argument(msg);
      }
      typename Sequence::const_iterator isit = is.begin();
      typename Sequence::reverse_iterator it = self->rbegin();
      std::advance(it,size-ii-1);
      for (size_t rc=0; rc<replacecount; ++rc) {
        *it++ = *isit++;
        for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
          it++;
      }
    }
  }

  template <class Sequence, class Difference>
  inline void
  delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
    typename Sequence::size_type size = self->size();
    Difference ii = 0;
    Difference jj = 0;
    swig::slice_adjust(i, j, step, size, ii, jj, true);
    if (step > 0) {
      if (jj > ii) {
        typename Sequence::iterator sb = self->begin();
        std::advance(sb,ii);
        if (step == 1) {
          typename Sequence::iterator se = self->begin();
          std::advance(se,jj);
          self->erase(sb,se);
        } else {
          typename Sequence::iterator it = sb;
          size_t delcount = (jj - ii + step - 1) / step;
          while (delcount) {
            it = self->erase(it);
            for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
              it++;
            delcount--;
          }
        }
      }
    } else {
      if (ii > jj) {
        typename Sequence::reverse_iterator sb = self->rbegin();
        std::advance(sb,size-ii-1);
        typename Sequence::reverse_iterator it = sb;
        size_t delcount = (ii - jj - step - 1) / -step;
        while (delcount) {
          it = typename Sequence::reverse_iterator(self->erase((++it).base()));
          for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
            it++;
          delcount--;
        }
      }
    }
  }
}


#if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
#  if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
#    define SWIG_STD_NOITERATOR_TRAITS_STL
#  endif
#endif

#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
#include <iterator>
#else
namespace std {
  template <class Iterator>
  struct iterator_traits {
    typedef ptrdiff_t difference_type;
    typedef typename Iterator::value_type value_type;
  };

  template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
  struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
    typedef Distance difference_type;
    typedef T value_type;
  };

  template <class T>
  struct iterator_traits<T*> {
    typedef T value_type;
    typedef ptrdiff_t difference_type;
  };

  template<typename _InputIterator>
  inline typename iterator_traits<_InputIterator>::difference_type
  distance(_InputIterator __first, _InputIterator __last)
  {
    typename iterator_traits<_InputIterator>::difference_type __n = 0;
    while (__first != __last) {
      ++__first; ++__n;
    }
    return __n;
  }
}
#endif


namespace swig {
  template<typename OutIterator>
  class SwigPyIterator_T :  public SwigPyIterator
  {
  public:
    typedef OutIterator out_iterator;
    typedef typename std::iterator_traits<out_iterator>::value_type value_type;    
    typedef SwigPyIterator_T<out_iterator> self_type;

    SwigPyIterator_T(out_iterator curr, PyObject *seq)
      : SwigPyIterator(seq), current(curr)
    {
    }

    const out_iterator& get_current() const
    {
      return current;
    }

    
    bool equal (const SwigPyIterator &iter) const
    {
      const self_type *iters = dynamic_cast<const self_type *>(&iter);
      if (iters) {
	return (current == iters->get_current());
      } else {
	throw std::invalid_argument("bad iterator type");
      }
    }
    
    ptrdiff_t distance(const SwigPyIterator &iter) const
    {
      const self_type *iters = dynamic_cast<const self_type *>(&iter);
      if (iters) {
	return std::distance(current, iters->get_current());
      } else {
	throw std::invalid_argument("bad iterator type");
      }
    }    
    
  protected:
    out_iterator current;
  };
  
  template <class ValueType>
  struct from_oper 
  {
    typedef const ValueType& argument_type;
    typedef PyObject *result_type;
    result_type operator()(argument_type v) const
    {
      return swig::from(v);
    }
  };

  template<typename OutIterator, 
	   typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
	   typename FromOper = from_oper<ValueType> >
  class SwigPyIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
  {
  public:
    FromOper from;
    typedef OutIterator out_iterator;
    typedef ValueType value_type;
    typedef SwigPyIterator_T<out_iterator>  base;
    typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
    
    SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      : SwigPyIterator_T<OutIterator>(curr, seq)
    {
    }
    
    PyObject *value() const {
      return from(static_cast<const value_type&>(*(base::current)));
    }
    
    SwigPyIterator *copy() const
    {
      return new self_type(*this);
    }

    SwigPyIterator *incr(size_t n = 1)
    {
      while (n--) {
	++base::current;
      }
      return this;
    }

    SwigPyIterator *decr(size_t n = 1)
    {
      while (n--) {
	--base::current;
      }
      return this;
    }
  };

  template<typename OutIterator, 
	   typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
	   typename FromOper = from_oper<ValueType> >
  class SwigPyIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
  {
  public:
    FromOper from;
    typedef OutIterator out_iterator;
    typedef ValueType value_type;
    typedef SwigPyIterator_T<out_iterator>  base;    
    typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
    
    SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
      : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last)
    {
    }
    
    PyObject *value() const {
      if (base::current == end) {
	throw stop_iteration();
      } else {
	return from(static_cast<const value_type&>(*(base::current)));
      }
    }
    
    SwigPyIterator *copy() const
    {
      return new self_type(*this);
    }

    SwigPyIterator *incr(size_t n = 1)
    {
      while (n--) {
	if (base::current == end) {
	  throw stop_iteration();
	} else {
	  ++base::current;
	}
      }
      return this;
    }

    SwigPyIterator *decr(size_t n = 1)
    {
      while (n--) {
	if (base::current == begin) {
	  throw stop_iteration();
	} else {
	  --base::current;
	}
      }
      return this;
    }

  private:
    out_iterator begin;
    out_iterator end;
  };

  template<typename OutIter>
  inline SwigPyIterator*
  make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
  {
    return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
  }

  template<typename OutIter>
  inline SwigPyIterator*
  make_output_iterator(const OutIter& current, PyObject *seq = 0)
  {
    return new SwigPyIteratorOpen_T<OutIter>(current, seq);
  }

}


namespace swig
{
  template <class T>
  struct SwigPySequence_Ref
  {
    SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      : _seq(seq), _index(index)
    {
    }
    
    operator T () const
    {
      swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
      try {
	return swig::as<T>(item, true);
      } catch (std::exception& e) {
	char msg[1024];
	sprintf(msg, "in sequence element %d ", (int)_index);
	if (!PyErr_Occurred()) {
	  ::SWIG_Error(SWIG_TypeError,  swig::type_name<T>());
	}
	SWIG_Python_AddErrorMsg(msg);
	SWIG_Python_AddErrorMsg(e.what());
	throw;
      }
    }

    SwigPySequence_Ref& operator=(const T& v)
    {
      PySequence_SetItem(_seq, _index, swig::from<T>(v));
      return *this;
    }

  private:
    PyObject* _seq;
    Py_ssize_t _index;
  };

  template <class T>
  struct SwigPySequence_ArrowProxy
  {
    SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
    const T* operator->() const { return &m_value; }
    operator const T*() const { return &m_value; }
    T m_value;
  };

  template <class T, class Reference >
  struct SwigPySequence_InputIterator
  {
    typedef SwigPySequence_InputIterator<T, Reference > self;

    typedef std::random_access_iterator_tag iterator_category;
    typedef Reference reference;
    typedef T value_type;
    typedef T* pointer;
    typedef Py_ssize_t difference_type;

    SwigPySequence_InputIterator()
    {
    }

    SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      : _seq(seq), _index(index)
    {
    }

    reference operator*() const
    {
      return reference(_seq, _index);
    }

    SwigPySequence_ArrowProxy<T>
    operator->() const {
      return SwigPySequence_ArrowProxy<T>(operator*());
    }

    bool operator==(const self& ri) const
    {
      return (_index == ri._index) && (_seq == ri._seq);
    }

    bool operator!=(const self& ri) const
    {
      return !(operator==(ri));
    }

    self& operator ++ ()
    {
      ++_index;
      return *this;
    }

    self& operator -- ()
    {
      --_index;
      return *this;
    }

    self& operator += (difference_type n)
    {
      _index += n;
      return *this;
    }

    self operator +(difference_type n) const
    {
      return self(_seq, _index + n);
    }

    self& operator -= (difference_type n)
    {
      _index -= n;
      return *this;
    }

    self operator -(difference_type n) const
    {
      return self(_seq, _index - n);
    }

    difference_type operator - (const self& ri) const
    {
      return _index - ri._index;
    }

    bool operator < (const self& ri) const
    {
      return _index < ri._index;
    }

    reference
    operator[](difference_type n) const
    {
      return reference(_seq, _index + n);
    }

  private:
    PyObject* _seq;
    difference_type _index;
  };

  // STL container wrapper around a Python sequence
  template <class T>
  struct SwigPySequence_Cont
  {
    typedef SwigPySequence_Ref<T> reference;
    typedef const SwigPySequence_Ref<T> const_reference;
    typedef T value_type;
    typedef T* pointer;
    typedef Py_ssize_t difference_type;
    typedef size_t size_type;
    typedef const pointer const_pointer;
    typedef SwigPySequence_InputIterator<T, reference> iterator;
    typedef SwigPySequence_InputIterator<T, const_reference> const_iterator;

    SwigPySequence_Cont(PyObject* seq) : _seq(0)
    {
      if (!PySequence_Check(seq)) {
	throw std::invalid_argument("a sequence is expected");
      }
      _seq = seq;
      Py_INCREF(_seq);
    }

    ~SwigPySequence_Cont()
    {
      Py_XDECREF(_seq);
    }

    size_type size() const
    {
      return static_cast<size_type>(PySequence_Size(_seq));
    }

    bool empty() const
    {
      return size() == 0;
    }

    iterator begin()
    {
      return iterator(_seq, 0);
    }

    const_iterator begin() const
    {
      return const_iterator(_seq, 0);
    }

    iterator end()
    {
      return iterator(_seq, size());
    }

    const_iterator end() const
    {
      return const_iterator(_seq, size());
    }

    reference operator[](difference_type n)
    {
      return reference(_seq, n);
    }

    const_reference operator[](difference_type n)  const
    {
      return const_reference(_seq, n);
    }

    bool check(bool set_err = true) const
    {
      Py_ssize_t s = size();
      for (Py_ssize_t i = 0; i < s; ++i) {
	swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
	if (!swig::check<value_type>(item)) {
	  if (set_err) {
	    char msg[1024];
	    sprintf(msg, "in sequence element %d", (int)i);
	    SWIG_Error(SWIG_RuntimeError, msg);
	  }
	  return false;
	}
      }
      return true;
    }

  private:
    PyObject* _seq;
  };

}


  namespace swig {
    template <>  struct traits< MatrixXd > {
      typedef pointer_category category;
      static const char* type_name() { return"MatrixXd"; }
    };
  }


namespace swig {
  template <class SwigPySeq, class Seq>
  inline void
  assign(const SwigPySeq& swigpyseq, Seq* seq) {
    // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
    typedef typename SwigPySeq::value_type value_type;
    typename SwigPySeq::const_iterator it = swigpyseq.begin();
    for (;it != swigpyseq.end(); ++it) {
      seq->insert(seq->end(),(value_type)(*it));
    }
  }

  template <class Seq, class T = typename Seq::value_type >
  struct traits_asptr_stdseq {
    typedef Seq sequence;
    typedef T value_type;

    static int asptr(PyObject *obj, sequence **seq) {
      if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
	sequence *p;
	if (::SWIG_ConvertPtr(obj,(void**)&p,
			      swig::type_info<sequence>(),0) == SWIG_OK) {
	  if (seq) *seq = p;
	  return SWIG_OLDOBJ;
	}
      } else if (PySequence_Check(obj)) {
	try {
	  SwigPySequence_Cont<value_type> swigpyseq(obj);
	  if (seq) {
	    sequence *pseq = new sequence();
	    assign(swigpyseq, pseq);
	    *seq = pseq;
	    return SWIG_NEWOBJ;
	  } else {
	    return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
	  }
	} catch (std::exception& e) {
	  if (seq) {
	    if (!PyErr_Occurred()) {
	      PyErr_SetString(PyExc_TypeError, e.what());
	    }
	  }
	  return SWIG_ERROR;
	}
      }
      return SWIG_ERROR;
    }
  };

  template <class Seq, class T = typename Seq::value_type >
  struct traits_from_stdseq {
    typedef Seq sequence;
    typedef T value_type;
    typedef typename Seq::size_type size_type;
    typedef typename sequence::const_iterator const_iterator;

    static PyObject *from(const sequence& seq) {
#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
      swig_type_info *desc = swig::type_info<sequence>();
      if (desc && desc->clientdata) {
	return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
      }
#endif
      size_type size = seq.size();
      if (size <= (size_type)INT_MAX) {
	PyObject *obj = PyTuple_New((Py_ssize_t)size);
	Py_ssize_t i = 0;
	for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) {
	  PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
	}
	return obj;
      } else {
	PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
	return NULL;
      }
    }
  };
}


  namespace swig {
    template <class T>
    struct traits_asptr<std::vector<T> >  {
      static int asptr(PyObject *obj, std::vector<T> **vec) {
	return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
      }
    };
    
    template <class T>
    struct traits_from<std::vector<T> > {
      static PyObject *from(const std::vector<T>& vec) {
	return traits_from_stdseq<std::vector<T> >::from(vec);
      }
    };
  }


      namespace swig {
	template <>  struct traits<std::vector< MatrixXd, std::allocator< MatrixXd > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "MatrixXd" "," "std::allocator< MatrixXd >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_MatrixXd_Sg__iterator(std::vector< MatrixXd > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_MatrixXd_Sg____nonzero__(std::vector< MatrixXd > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_MatrixXd_Sg____bool__(std::vector< MatrixXd > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< MatrixXd >::size_type std_vector_Sl_MatrixXd_Sg____len__(std::vector< MatrixXd > const *self){
      return self->size();
    }

SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long  (unsigned long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value)); 
}


SWIGINTERNINLINE PyObject *
SWIG_From_size_t  (size_t value)
{    
  return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
}

SWIGINTERN std::vector< MatrixXd,std::allocator< MatrixXd > > *std_vector_Sl_MatrixXd_Sg____getslice__(std::vector< MatrixXd > *self,std::vector< MatrixXd >::difference_type i,std::vector< MatrixXd >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg____setslice____SWIG_0(std::vector< MatrixXd > *self,std::vector< MatrixXd >::difference_type i,std::vector< MatrixXd >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< MatrixXd,std::allocator< MatrixXd > >());
    }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg____setslice____SWIG_1(std::vector< MatrixXd > *self,std::vector< MatrixXd >::difference_type i,std::vector< MatrixXd >::difference_type j,std::vector< MatrixXd,std::allocator< MatrixXd > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg____delslice__(std::vector< MatrixXd > *self,std::vector< MatrixXd >::difference_type i,std::vector< MatrixXd >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg____delitem____SWIG_0(std::vector< MatrixXd > *self,std::vector< MatrixXd >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< MatrixXd,std::allocator< MatrixXd > > *std_vector_Sl_MatrixXd_Sg____getitem____SWIG_0(std::vector< MatrixXd > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< MatrixXd,std::allocator< MatrixXd > >::difference_type id = i;
      std::vector< MatrixXd,std::allocator< MatrixXd > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg____setitem____SWIG_0(std::vector< MatrixXd > *self,PySliceObject *slice,std::vector< MatrixXd,std::allocator< MatrixXd > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< MatrixXd,std::allocator< MatrixXd > >::difference_type id = i;
      std::vector< MatrixXd,std::allocator< MatrixXd > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg____setitem____SWIG_1(std::vector< MatrixXd > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< MatrixXd,std::allocator< MatrixXd > >::difference_type id = i;
      std::vector< MatrixXd,std::allocator< MatrixXd > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg____delitem____SWIG_1(std::vector< MatrixXd > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< MatrixXd,std::allocator< MatrixXd > >::difference_type id = i;
      std::vector< MatrixXd,std::allocator< MatrixXd > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< MatrixXd >::value_type const &std_vector_Sl_MatrixXd_Sg____getitem____SWIG_1(std::vector< MatrixXd > const *self,std::vector< MatrixXd >::difference_type i){
      return *(swig::cgetpos(self, i));
    }

#if NPY_API_VERSION < 0x00000007
#define NPY_ARRAY_DEFAULT NPY_DEFAULT
#define NPY_ARRAY_FARRAY  NPY_FARRAY
#define NPY_FORTRANORDER  NPY_FORTRAN
#endif


/* Macros to extract array attributes.
 */
#if NPY_API_VERSION < 0x00000007
#define is_array(a)            ((a) && PyArray_Check((PyArrayObject*)a))
#define array_type(a)          (int)(PyArray_TYPE((PyArrayObject*)a))
#define array_numdims(a)       (((PyArrayObject*)a)->nd)
#define array_dimensions(a)    (((PyArrayObject*)a)->dimensions)
#define array_size(a,i)        (((PyArrayObject*)a)->dimensions[i])
#define array_strides(a)       (((PyArrayObject*)a)->strides)
#define array_stride(a,i)      (((PyArrayObject*)a)->strides[i])
#define array_data(a)          (((PyArrayObject*)a)->data)
#define array_descr(a)         (((PyArrayObject*)a)->descr)
#define array_flags(a)         (((PyArrayObject*)a)->flags)
#define array_enableflags(a,f) (((PyArrayObject*)a)->flags) = f
#else
#define is_array(a)            ((a) && PyArray_Check(a))
#define array_type(a)          PyArray_TYPE((PyArrayObject*)a)
#define array_numdims(a)       PyArray_NDIM((PyArrayObject*)a)
#define array_dimensions(a)    PyArray_DIMS((PyArrayObject*)a)
#define array_strides(a)       PyArray_STRIDES((PyArrayObject*)a)
#define array_stride(a,i)      PyArray_STRIDE((PyArrayObject*)a,i)
#define array_size(a,i)        PyArray_DIM((PyArrayObject*)a,i)
#define array_data(a)          PyArray_DATA((PyArrayObject*)a)
#define array_descr(a)         PyArray_DESCR((PyArrayObject*)a)
#define array_flags(a)         PyArray_FLAGS((PyArrayObject*)a)
#define array_enableflags(a,f) PyArray_ENABLEFLAGS((PyArrayObject*)a,f)
#endif
#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS((PyArrayObject*)a))
#define array_is_native(a)     (PyArray_ISNOTSWAPPED((PyArrayObject*)a))
#define array_is_fortran(a)    (PyArray_ISFORTRAN((PyArrayObject*)a))


  /* Given a PyObject, return a string describing its type.
   */
  const char* pytype_string(PyObject* py_obj)
  {
    if (py_obj == NULL          ) return "C NULL value";
    if (py_obj == Py_None       ) return "Python None" ;
    if (PyCallable_Check(py_obj)) return "callable"    ;
    if (PyString_Check(  py_obj)) return "string"      ;
    if (PyInt_Check(     py_obj)) return "int"         ;
    if (PyFloat_Check(   py_obj)) return "float"       ;
    if (PyDict_Check(    py_obj)) return "dict"        ;
    if (PyList_Check(    py_obj)) return "list"        ;
    if (PyTuple_Check(   py_obj)) return "tuple"       ;
#if PY_MAJOR_VERSION < 3
    if (PyFile_Check(    py_obj)) return "file"        ;
    if (PyModule_Check(  py_obj)) return "module"      ;
    if (PyInstance_Check(py_obj)) return "instance"    ;
#endif

    return "unkown type";
  }

  /* Given a NumPy typecode, return a string describing the type.
   */
  const char* typecode_string(int typecode)
  {
    static const char* type_names[25] = {"bool",
                                         "byte",
                                         "unsigned byte",
                                         "short",
                                         "unsigned short",
                                         "int",
                                         "unsigned int",
                                         "long",
                                         "unsigned long",
                                         "long long",
                                         "unsigned long long",
                                         "float",
                                         "double",
                                         "long double",
                                         "complex float",
                                         "complex double",
                                         "complex long double",
                                         "object",
                                         "string",
                                         "unicode",
                                         "void",
                                         "ntypes",
                                         "notype",
                                         "char",
                                         "unknown"};
    return typecode < 24 ? type_names[typecode] : type_names[24];
  }

  /* Make sure input has correct numpy type.  This now just calls
     PyArray_EquivTypenums().
   */
  int type_match(int actual_type,
                 int desired_type)
  {
    return PyArray_EquivTypenums(actual_type, desired_type);
  }

#ifdef SWIGPY_USE_CAPSULE
  void free_cap(PyObject * cap)
  {
    void* array = (void*) PyCapsule_GetPointer(cap,SWIGPY_CAPSULE_NAME);
    if (array != NULL) free(array);
  }
#endif




  /* Given a PyObject pointer, cast it to a PyArrayObject pointer if
   * legal.  If not, set the python error string appropriately and
   * return NULL.
   */
  PyArrayObject* obj_to_array_no_conversion(PyObject* input,
                                            int        typecode)
  {
    PyArrayObject* ary = NULL;
    if (is_array(input) && (typecode == NPY_NOTYPE ||
                            PyArray_EquivTypenums(array_type(input), typecode)))
    {
      ary = (PyArrayObject*) input;
    }
    else if is_array(input)
    {
      const char* desired_type = typecode_string(typecode);
      const char* actual_type  = typecode_string(array_type(input));
      PyErr_Format(PyExc_TypeError,
                   "Array of type '%s' required.  Array of type '%s' given",
                   desired_type, actual_type);
      ary = NULL;
    }
    else
    {
      const char* desired_type = typecode_string(typecode);
      const char* actual_type  = pytype_string(input);
      PyErr_Format(PyExc_TypeError,
                   "Array of type '%s' required.  A '%s' was given",
                   desired_type,
                   actual_type);
      ary = NULL;
    }
    return ary;
  }

  /* Convert the given PyObject to a NumPy array with the given
   * typecode.  On success, return a valid PyArrayObject* with the
   * correct type.  On failure, the python error string will be set and
   * the routine returns NULL.
   */
  PyArrayObject* obj_to_array_allow_conversion(PyObject* input,
                                               int       typecode,
                                               int*      is_new_object)
  {
    PyArrayObject* ary = NULL;
    PyObject*      py_obj;
    if (is_array(input) && (typecode == NPY_NOTYPE ||
                            PyArray_EquivTypenums(array_type(input),typecode)))
    {
      ary = (PyArrayObject*) input;
      *is_new_object = 0;
    }
    else
    {
      py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_ARRAY_DEFAULT);
      /* If NULL, PyArray_FromObject will have set python error value.*/
      ary = (PyArrayObject*) py_obj;
      *is_new_object = 1;
    }
    return ary;
  }

  /* Given a PyArrayObject, check to see if it is contiguous.  If so,
   * return the input pointer and flag it as not a new object.  If it is
   * not contiguous, create a new PyArrayObject using the original data,
   * flag it as a new object and return the pointer.
   */
  PyArrayObject* make_contiguous(PyArrayObject* ary,
                                 int*           is_new_object,
                                 int            min_dims,
                                 int            max_dims)
  {
    PyArrayObject* result;
    if (array_is_contiguous(ary))
    {
      result = ary;
      *is_new_object = 0;
    }
    else
    {
      result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary,
                                                              array_type(ary),
                                                              min_dims,
                                                              max_dims);
      *is_new_object = 1;
    }
    return result;
  }

  /* Given a PyArrayObject, check to see if it is Fortran-contiguous.
   * If so, return the input pointer, but do not flag it as not a new
   * object.  If it is not Fortran-contiguous, create a new
   * PyArrayObject using the original data, flag it as a new object
   * and return the pointer.
   */
  PyArrayObject* make_fortran(PyArrayObject* ary,
                              int*           is_new_object)
  {
    PyArrayObject* result;
    if (array_is_fortran(ary))
    {
      result = ary;
      *is_new_object = 0;
    }
    else
    {
      Py_INCREF(array_descr(ary));
      result = (PyArrayObject*) PyArray_FromArray(ary,
                                                  array_descr(ary),
                                                  NPY_FORTRANORDER);
      *is_new_object = 1;
    }
    return result;
  }

  /* Convert a given PyObject to a contiguous PyArrayObject of the
   * specified type.  If the input object is not a contiguous
   * PyArrayObject, a new one will be created and the new object flag
   * will be set.
   */
  PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input,
                                                          int       typecode,
                                                          int*      is_new_object)
  {
    int is_new1 = 0;
    int is_new2 = 0;
    PyArrayObject* ary2;
    PyArrayObject* ary1 = obj_to_array_allow_conversion(input,
                                                        typecode,
                                                        &is_new1);
    if (ary1)
    {
      ary2 = make_contiguous(ary1, &is_new2, 0, 0);
      if ( is_new1 && is_new2)
      {
        Py_DECREF(ary1);
      }
      ary1 = ary2;
    }
    *is_new_object = is_new1 || is_new2;
    return ary1;
  }

  /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the
   * specified type.  If the input object is not a Fortran-ordered
   * PyArrayObject, a new one will be created and the new object flag
   * will be set.
   */
  PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input,
                                                       int       typecode,
                                                       int*      is_new_object)
  {
    int is_new1 = 0;
    int is_new2 = 0;
    PyArrayObject* ary2;
    PyArrayObject* ary1 = obj_to_array_allow_conversion(input,
                                                        typecode,
                                                        &is_new1);
    if (ary1)
    {
      ary2 = make_fortran(ary1, &is_new2);
      if (is_new1 && is_new2)
      {
        Py_DECREF(ary1);
      }
      ary1 = ary2;
    }
    *is_new_object = is_new1 || is_new2;
    return ary1;
  }


  /* Test whether a python object is contiguous.  If array is
   * contiguous, return 1.  Otherwise, set the python error string and
   * return 0.
   */
  int require_contiguous(PyArrayObject* ary)
  {
    int contiguous = 1;
    if (!array_is_contiguous(ary))
    {
      PyErr_SetString(PyExc_TypeError,
                      "Array must be contiguous.  A non-contiguous array was given");
      contiguous = 0;
    }
    return contiguous;
  }

  /* Require that a numpy array is not byte-swapped.  If the array is
   * not byte-swapped, return 1.  Otherwise, set the python error string
   * and return 0.
   */
  int require_native(PyArrayObject* ary)
  {
    int native = 1;
    if (!array_is_native(ary))
    {
      PyErr_SetString(PyExc_TypeError,
                      "Array must have native byteorder.  "
                      "A byte-swapped array was given");
      native = 0;
    }
    return native;
  }

  /* Require the given PyArrayObject to have a specified number of
   * dimensions.  If the array has the specified number of dimensions,
   * return 1.  Otherwise, set the python error string and return 0.
   */
  int require_dimensions(PyArrayObject* ary,
                         int            exact_dimensions)
  {
    int success = 1;
    if (array_numdims(ary) != exact_dimensions)
    {
      PyErr_Format(PyExc_TypeError,
                   "Array must have %d dimensions.  Given array has %d dimensions",
                   exact_dimensions,
                   array_numdims(ary));
      success = 0;
    }
    return success;
  }

  /* Require the given PyArrayObject to have one of a list of specified
   * number of dimensions.  If the array has one of the specified number
   * of dimensions, return 1.  Otherwise, set the python error string
   * and return 0.
   */
  int require_dimensions_n(PyArrayObject* ary,
                           int*           exact_dimensions,
                           int            n)
  {
    int success = 0;
    int i;
    char dims_str[255] = "";
    char s[255];
    for (i = 0; i < n && !success; i++)
    {
      if (array_numdims(ary) == exact_dimensions[i])
      {
        success = 1;
      }
    }
    if (!success)
    {
      for (i = 0; i < n-1; i++)
      {
        sprintf(s, "%d, ", exact_dimensions[i]);
        strcat(dims_str,s);
      }
      sprintf(s, " or %d", exact_dimensions[n-1]);
      strcat(dims_str,s);
      PyErr_Format(PyExc_TypeError,
                   "Array must have %s dimensions.  Given array has %d dimensions",
                   dims_str,
                   array_numdims(ary));
    }
    return success;
  }

  /* Require the given PyArrayObject to have a specified shape.  If the
   * array has the specified shape, return 1.  Otherwise, set the python
   * error string and return 0.
   */
  int require_size(PyArrayObject* ary,
                   npy_intp*      size,
                   int            n)
  {
    int i;
    int success = 1;
    int len;
    char desired_dims[255] = "[";
    char s[255];
    char actual_dims[255] = "[";
    for(i=0; i < n;i++)
    {
      if (size[i] != -1 &&  size[i] != array_size(ary,i))
      {
        success = 0;
      }
    }
    if (!success)
    {
      for (i = 0; i < n; i++)
      {
        if (size[i] == -1)
        {
          sprintf(s, "*,");
        }
        else
        {
          sprintf(s, "%ld,", (long int)size[i]);
        }
        strcat(desired_dims,s);
      }
      len = strlen(desired_dims);
      desired_dims[len-1] = ']';
      for (i = 0; i < n; i++)
      {
        sprintf(s, "%ld,", (long int)array_size(ary,i));
        strcat(actual_dims,s);
      }
      len = strlen(actual_dims);
      actual_dims[len-1] = ']';
      PyErr_Format(PyExc_TypeError,
                   "Array must have shape of %s.  Given array has shape of %s",
                   desired_dims,
                   actual_dims);
    }
    return success;
  }

  /* Require the given PyArrayObject to to be Fortran ordered.  If the
   * the PyArrayObject is already Fortran ordered, do nothing.  Else,
   * set the Fortran ordering flag and recompute the strides.
   */
  int require_fortran(PyArrayObject* ary)
  {
    int success = 1;
    int nd = array_numdims(ary);
    int i;
    npy_intp * strides = array_strides(ary);
    if (array_is_fortran(ary)) return success;
    /* Set the Fortran ordered flag */
    array_enableflags(ary,NPY_ARRAY_FARRAY);
    /* Recompute the strides */
    strides[0] = strides[nd-1];
    for (i=1; i < nd; ++i)
      strides[i] = strides[i-1] * array_size(ary,i-1);
    return success;
  }



SWIGINTERN void std_vector_Sl_MatrixXd_Sg____setitem____SWIG_2(std::vector< MatrixXd > *self,std::vector< MatrixXd >::difference_type i,std::vector< MatrixXd >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< MatrixXd >::value_type std_vector_Sl_MatrixXd_Sg__pop(std::vector< MatrixXd > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< MatrixXd,std::allocator< MatrixXd > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg__append(std::vector< MatrixXd > *self,std::vector< MatrixXd >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< MatrixXd >::iterator std_vector_Sl_MatrixXd_Sg__erase__SWIG_0(std::vector< MatrixXd > *self,std::vector< MatrixXd >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< MatrixXd >::iterator std_vector_Sl_MatrixXd_Sg__erase__SWIG_1(std::vector< MatrixXd > *self,std::vector< MatrixXd >::iterator first,std::vector< MatrixXd >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< MatrixXd >::iterator std_vector_Sl_MatrixXd_Sg__insert__SWIG_0(std::vector< MatrixXd > *self,std::vector< MatrixXd >::iterator pos,std::vector< MatrixXd >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_MatrixXd_Sg__insert__SWIG_1(std::vector< MatrixXd > *self,std::vector< MatrixXd >::iterator pos,std::vector< MatrixXd >::size_type n,std::vector< MatrixXd >::value_type const &x){ self->insert(pos, n, x); }

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(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
#if PY_VERSION_HEX>=0x03000000
  if (PyUnicode_Check(obj))
#else  
  if (PyString_Check(obj))
#endif
  {
    char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000
    if (!alloc && cptr) {
        /* We can't allow converting without allocation, since the internal
           representation of string in Python 3 is UCS-2/UCS-4 but we require
           a UTF-8 representation.
           TODO(bhy) More detailed explanation */
        return SWIG_RuntimeError;
    }
    obj = PyUnicode_AsUTF8String(obj);
    PyBytes_AsStringAndSize(obj, &cstr, &len);
    if(alloc) *alloc = SWIG_NEWOBJ;
#else
    PyString_AsStringAndSize(obj, &cstr, &len);
#endif
    if (cptr) {
      if (alloc) {
	/* 
	   In python the user should not be able to modify the inner
	   string representation. To warranty that, if you define
	   SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
	   buffer is always returned.

	   The default behavior is just to return the pointer value,
	   so, be careful.
	*/ 
#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
	if (*alloc != SWIG_OLDOBJ) 
#else
	if (*alloc == SWIG_NEWOBJ) 
#endif
	{
	  *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
	  *alloc = SWIG_NEWOBJ;
	} else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      } else {
	#if PY_VERSION_HEX>=0x03000000
	assert(0); /* Should never reach here in Python 3 */
	#endif
	*cptr = SWIG_Python_str_AsChar(obj);
      }
    }
    if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000
    Py_XDECREF(obj);
#endif
    return SWIG_OK;
  } else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if PY_VERSION_HEX<0x03000000
    if (PyUnicode_Check(obj)) {
      char *cstr; Py_ssize_t len;
      if (!alloc && cptr) {
        return SWIG_RuntimeError;
      }
      obj = PyUnicode_AsUTF8String(obj);
      if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
        if (cptr) {
          if (alloc) *alloc = SWIG_NEWOBJ;
          *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
        }
        if (psize) *psize = len + 1;

        Py_XDECREF(obj);
        return SWIG_OK;
      } else {
        Py_XDECREF(obj);
      }
    }
#endif
#endif

    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      void* vptr = 0;
      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = (char *) vptr;
	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsPtr_std_string (PyObject * 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 int
SWIG_AsVal_std_string (PyObject * obj, std::string *val)
{
  std::string* v = (std::string *) 0;
  int res = SWIG_AsPtr_std_string (obj, &v);
  if (!SWIG_IsOK(res)) return res;
  if (v) {
    if (val) *val = *v;
    if (SWIG_IsNewObj(res)) {
      delete v;
      res = SWIG_DelNewMask(res);
    }
    return res;
  }
  return SWIG_ERROR;
}


SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  if (carray) {
    if (size > INT_MAX) {
      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
      return pchar_descriptor ? 
	SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    } else {
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03010000
      return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else
      return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
#else
      return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
    }
  } else {
    return SWIG_Py_Void();
  }
}


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


namespace swig {
  template <> struct traits< std::string > {
    typedef value_category category;
    static const char* type_name() { return"std::string"; }
  };
  template <>  struct traits_asval< std::string > {
    typedef std::string value_type;
    static int asval(PyObject *obj, value_type *val) {
      return SWIG_AsVal_std_string (obj, val);
    }
  };
  template <>  struct traits_from< std::string > {
    typedef std::string value_type;
    static PyObject *from(const value_type& val) {
      return SWIG_From_std_string  (val);
    }
  };
}


      namespace swig {
	template <>  struct traits<std::vector< std::string, std::allocator< std::string > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "std::string" "," "std::allocator< std::string >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_string_Sg__iterator(std::vector< std::string > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_std_string_Sg____nonzero__(std::vector< std::string > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_std_string_Sg____bool__(std::vector< std::string > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< std::string >::size_type std_vector_Sl_std_string_Sg____len__(std::vector< std::string > const *self){
      return self->size();
    }
SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< std::string,std::allocator< std::string > >());
    }
SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_1(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j,std::vector< std::string,std::allocator< std::string > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_std_string_Sg____delslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< std::string,std::allocator< std::string > >::difference_type id = i;
      std::vector< std::string,std::allocator< std::string > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice,std::vector< std::string,std::allocator< std::string > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< std::string,std::allocator< std::string > >::difference_type id = i;
      std::vector< std::string,std::allocator< std::string > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< std::string,std::allocator< std::string > >::difference_type id = i;
      std::vector< std::string,std::allocator< std::string > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< std::string,std::allocator< std::string > >::difference_type id = i;
      std::vector< std::string,std::allocator< std::string > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< std::string >::value_type const &std_vector_Sl_std_string_Sg____getitem____SWIG_1(std::vector< std::string > const *self,std::vector< std::string >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_2(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< std::string >::value_type std_vector_Sl_std_string_Sg__pop(std::vector< std::string > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< std::string,std::allocator< std::string > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_std_string_Sg__append(std::vector< std::string > *self,std::vector< std::string >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator first,std::vector< std::string >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__insert__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::size_type n,std::vector< std::string >::value_type const &x){ self->insert(pos, n, x); }

struct SWIG_null_deleter {
  void operator() (void const *) const {
  }
};
#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter()
#define SWIG_NO_NULL_DELETER_1
#define SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW
#define SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN


#define SWIG_NO_NULL_DELETER_SWIG_BUILTIN_INIT


  namespace swig {

















































    template <class T, class U >
    struct traits_asptr<std::pair<T,U> >  {
      typedef std::pair<T,U> value_type;

      static int get_pair(PyObject* first, PyObject* second,
			  std::pair<T,U> **val) 
      {
	if (val) {
	  value_type *vp = (new std::pair<T,U>);
	  T *pfirst = &(vp->first);
	  int res1 = swig::asval((PyObject*)first, pfirst);
	  if (!SWIG_IsOK(res1)) return res1;
	  U *psecond = &(vp->second);
	  int res2 = swig::asval((PyObject*)second, psecond);
	  if (!SWIG_IsOK(res2)) return res2;
	  *val = vp;
	  return SWIG_AddNewMask(res1 > res2 ? res1 : res2);
	} else {
	  T *pfirst = 0;
	  int res1 = swig::asval((PyObject*)first, pfirst);
	  if (!SWIG_IsOK(res1)) return res1;
	  U *psecond = 0;
	  int res2 = swig::asval((PyObject*)second, psecond);
	  if (!SWIG_IsOK(res2)) return res2;
	  return res1 > res2 ? res1 : res2;
	}	
      }

      static int asptr(PyObject *obj, std::pair<T,U> **val) {
	int res = SWIG_ERROR;
	if (PyTuple_Check(obj)) {
	  if (PyTuple_GET_SIZE(obj) == 2) {
	    res = get_pair(PyTuple_GET_ITEM(obj,0),PyTuple_GET_ITEM(obj,1), val);
	  }
	} else if (PySequence_Check(obj)) {
	  if (PySequence_Size(obj) == 2) {
	    swig::SwigVar_PyObject first = PySequence_GetItem(obj,0);
	    swig::SwigVar_PyObject second = PySequence_GetItem(obj,1);
	    res = get_pair(first, second, val);
	  }
	} else {
	  value_type *p;
	  res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<value_type>(),0);
	  if (SWIG_IsOK(res) && val)  *val = p;
	}
	return res;
      }
    };


    template <class T, class U >
    struct traits_from<std::pair<T,U> >   {
      static PyObject *from(const std::pair<T,U>& val) {
	PyObject* obj = PyTuple_New(2);
	PyTuple_SetItem(obj,0,swig::from(val.first));
	PyTuple_SetItem(obj,1,swig::from(val.second));
	return obj;
      }
    };
  }





































      namespace swig {
	template <>  struct traits<std::pair< std::string, MatrixXd > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::pair<" "std::string" "," "MatrixXd" " >";
	  }
	};
      }
    

  namespace swig {
    template <class ValueType>
    struct from_key_oper 
    {
      typedef const ValueType& argument_type;
      typedef  PyObject *result_type;
      result_type operator()(argument_type v) const
      {
	return swig::from(v.first);
      }
    };

    template <class ValueType>
    struct from_value_oper 
    {
      typedef const ValueType& argument_type;
      typedef  PyObject *result_type;
      result_type operator()(argument_type v) const
      {
	return swig::from(v.second);
      }
    };

    template<class OutIterator, class FromOper, class ValueType = typename OutIterator::value_type>
    struct SwigPyMapIterator_T : SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper>
    {
      SwigPyMapIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq)
	: SwigPyIteratorClosed_T<OutIterator,ValueType,FromOper>(curr, first, last, seq)
      {
      }
    };


    template<class OutIterator,
	     class FromOper = from_key_oper<typename OutIterator::value_type> >
    struct SwigPyMapKeyIterator_T : SwigPyMapIterator_T<OutIterator, FromOper>
    {
      SwigPyMapKeyIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq)
	: SwigPyMapIterator_T<OutIterator, FromOper>(curr, first, last, seq)
      {
      }
    };

    template<typename OutIter>
    inline SwigPyIterator*
    make_output_key_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, PyObject *seq = 0)
    {
      return new SwigPyMapKeyIterator_T<OutIter>(current, begin, end, seq);
    }

    template<class OutIterator,
	     class FromOper = from_value_oper<typename OutIterator::value_type> >
    struct SwigPyMapValueITerator_T : SwigPyMapIterator_T<OutIterator, FromOper>
    {
      SwigPyMapValueITerator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq)
	: SwigPyMapIterator_T<OutIterator, FromOper>(curr, first, last, seq)
      {
      }
    };
    

    template<typename OutIter>
    inline SwigPyIterator*
    make_output_value_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, PyObject *seq = 0)
    {
      return new SwigPyMapValueITerator_T<OutIter>(current, begin, end, seq);
    }
  }


  namespace swig {
    template <class SwigPySeq, class K, class T, class Compare, class Alloc >
    inline void
    assign(const SwigPySeq& swigpyseq, std::map<K,T,Compare,Alloc > *map) {
      typedef typename std::map<K,T,Compare,Alloc >::value_type value_type;
      typename SwigPySeq::const_iterator it = swigpyseq.begin();
      for (;it != swigpyseq.end(); ++it) {
	map->insert(value_type(it->first, it->second));
      }
    }

    template <class K, class T, class Compare, class Alloc>
    struct traits_asptr<std::map<K,T,Compare,Alloc > >  {
      typedef std::map<K,T,Compare,Alloc > map_type;
      static int asptr(PyObject *obj, map_type **val) {
	int res = SWIG_ERROR;
	SWIG_PYTHON_THREAD_BEGIN_BLOCK;
	if (PyDict_Check(obj)) {
	  SwigVar_PyObject items = PyObject_CallMethod(obj,(char *)"items",NULL);
#if PY_VERSION_HEX >= 0x03000000
          /* In Python 3.x the ".items()" method returns a dict_items object */
          items = PySequence_Fast(items, ".items() didn't return a sequence!");
#endif
	  res = traits_asptr_stdseq<map_type, std::pair<K, T> >::asptr(items, val);
	} else {
	  map_type *p;
	  res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
	  if (SWIG_IsOK(res) && val)  *val = p;
	}
	SWIG_PYTHON_THREAD_END_BLOCK;
	return res;
      }      
    };
      
    template <class K, class T, class Compare, class Alloc >
    struct traits_from<std::map<K,T,Compare,Alloc > >  {
      typedef std::map<K,T,Compare,Alloc > map_type;
      typedef typename map_type::const_iterator const_iterator;
      typedef typename map_type::size_type size_type;

      static PyObject *asdict(const map_type& map) {
	SWIG_PYTHON_THREAD_BEGIN_BLOCK;
	size_type size = map.size();
	Py_ssize_t pysize = (size <= (size_type) INT_MAX) ? (Py_ssize_t) size : -1;
	if (pysize < 0) {
	  PyErr_SetString(PyExc_OverflowError, "map size not valid in python");
	  SWIG_PYTHON_THREAD_END_BLOCK;
	  return NULL;
	}
	PyObject *obj = PyDict_New();
	for (const_iterator i= map.begin(); i!= map.end(); ++i) {
	  swig::SwigVar_PyObject key = swig::from(i->first);
	  swig::SwigVar_PyObject val = swig::from(i->second);
	  PyDict_SetItem(obj, key, val);
	}
	SWIG_PYTHON_THREAD_END_BLOCK;
	return obj;
      }
                
      static PyObject *from(const map_type& map) {
	swig_type_info *desc = swig::type_info<map_type>();
	if (desc && desc->clientdata) {
	  return SWIG_InternalNewPointerObj(new map_type(map), desc, SWIG_POINTER_OWN);
	} else {
	  return asdict(map);
	}
      }
    };
  }


      namespace swig {
	template <>  struct traits<std::map< std::string, MatrixXd, std::less< std::string >, std::allocator< std::pair< std::string const,MatrixXd > > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::map<" "std::string" "," "MatrixXd" "," "std::less< std::string >" "," "std::allocator< std::pair< std::string const,MatrixXd > >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_MatrixXd_Sg__iterator(std::map< std::string,MatrixXd > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_map_Sl_std_string_Sc_MatrixXd_Sg____nonzero__(std::map< std::string,MatrixXd > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_map_Sl_std_string_Sc_MatrixXd_Sg____bool__(std::map< std::string,MatrixXd > const *self){
      return !(self->empty());
    }
SWIGINTERN std::map< std::string,MatrixXd >::size_type std_map_Sl_std_string_Sc_MatrixXd_Sg____len__(std::map< std::string,MatrixXd > const *self){
      return self->size();
    }
SWIGINTERN std::map< std::string,MatrixXd >::mapped_type const &std_map_Sl_std_string_Sc_MatrixXd_Sg____getitem__(std::map< std::string,MatrixXd > *self,std::map< std::string,MatrixXd >::key_type const &key){
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::const_iterator i = self->find(key);
      if (i != self->end())
	return i->second;
      else
	throw std::out_of_range("key not found");
    }
SWIGINTERN void std_map_Sl_std_string_Sc_MatrixXd_Sg____delitem__(std::map< std::string,MatrixXd > *self,std::map< std::string,MatrixXd >::key_type const &key){
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::iterator i = self->find(key);
      if (i != self->end())
	self->erase(i);
      else
	throw std::out_of_range("key not found");
    }
SWIGINTERN bool std_map_Sl_std_string_Sc_MatrixXd_Sg__has_key(std::map< std::string,MatrixXd > const *self,std::map< std::string,MatrixXd >::key_type const &key){
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::const_iterator i = self->find(key);
      return i != self->end();
    }
SWIGINTERN PyObject *std_map_Sl_std_string_Sc_MatrixXd_Sg__keys(std::map< std::string,MatrixXd > *self){
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::size_type size = self->size();
      Py_ssize_t pysize = (size <= (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1;
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      if (pysize < 0) {
	PyErr_SetString(PyExc_OverflowError, "map size not valid in python");
	SWIG_PYTHON_THREAD_END_BLOCK;
	return NULL;
      }
      PyObject* keyList = PyList_New(pysize);
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::const_iterator i = self->begin();
      for (Py_ssize_t j = 0; j < pysize; ++i, ++j) {
	PyList_SET_ITEM(keyList, j, swig::from(i->first));
      }
      SWIG_PYTHON_THREAD_END_BLOCK;
      return keyList;
    }
SWIGINTERN PyObject *std_map_Sl_std_string_Sc_MatrixXd_Sg__values(std::map< std::string,MatrixXd > *self){
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::size_type size = self->size();
      Py_ssize_t pysize = (size <= (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1;
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      if (pysize < 0) {
	PyErr_SetString(PyExc_OverflowError, "map size not valid in python");
	SWIG_PYTHON_THREAD_END_BLOCK;
	return NULL;
      }
      PyObject* valList = PyList_New(pysize);
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::const_iterator i = self->begin();
      for (Py_ssize_t j = 0; j < pysize; ++i, ++j) {
	PyList_SET_ITEM(valList, j, swig::from(i->second));
      }
      SWIG_PYTHON_THREAD_END_BLOCK;
      return valList;
    }
SWIGINTERN PyObject *std_map_Sl_std_string_Sc_MatrixXd_Sg__items(std::map< std::string,MatrixXd > *self){
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::size_type size = self->size();
      Py_ssize_t pysize = (size <= (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1;
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      if (pysize < 0) {
	PyErr_SetString(PyExc_OverflowError, "map size not valid in python");
	SWIG_PYTHON_THREAD_END_BLOCK;
	return NULL;
      }    
      PyObject* itemList = PyList_New(pysize);
      std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >::const_iterator i = self->begin();
      for (Py_ssize_t j = 0; j < pysize; ++i, ++j) {
	PyList_SET_ITEM(itemList, j, swig::from(*i));
      }
      SWIG_PYTHON_THREAD_END_BLOCK;
      return itemList;
    }
SWIGINTERN bool std_map_Sl_std_string_Sc_MatrixXd_Sg____contains__(std::map< std::string,MatrixXd > *self,std::map< std::string,MatrixXd >::key_type const &key){
      return self->find(key) != self->end();
    }
SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_MatrixXd_Sg__key_iterator(std::map< std::string,MatrixXd > *self,PyObject **PYTHON_SELF){
      return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN swig::SwigPyIterator *std_map_Sl_std_string_Sc_MatrixXd_Sg__value_iterator(std::map< std::string,MatrixXd > *self,PyObject **PYTHON_SELF){
      return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN void std_map_Sl_std_string_Sc_MatrixXd_Sg____setitem____SWIG_0(std::map< std::string,MatrixXd > *self,std::map< std::string,MatrixXd >::key_type const &key){
      self->erase(key);
    }
SWIGINTERN void std_map_Sl_std_string_Sc_MatrixXd_Sg____setitem____SWIG_1(std::map< std::string,MatrixXd > *self,std::map< std::string,MatrixXd >::key_type const &key,std::map< std::string,MatrixXd >::mapped_type const &x){
      (*self)[key] = x;
    }
SWIGINTERN PyObject *std_map_Sl_std_string_Sc_MatrixXd_Sg__asdict(std::map< std::string,MatrixXd > *self){
      return swig::traits_from< std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > > >::asdict(*self);
    }
SWIGINTERN void std_map_Sl_std_string_Sc_MatrixXd_Sg__erase__SWIG_1(std::map< std::string,MatrixXd > *self,std::map< std::string,MatrixXd >::iterator position){ self->erase(position); }
SWIGINTERN void std_map_Sl_std_string_Sc_MatrixXd_Sg__erase__SWIG_2(std::map< std::string,MatrixXd > *self,std::map< std::string,MatrixXd >::iterator first,std::map< std::string,MatrixXd >::iterator last){ self->erase(first, last); }

  namespace swig {
    template <>  struct traits< VectorXi > {
      typedef pointer_category category;
      static const char* type_name() { return"VectorXi"; }
    };
  }


      namespace swig {
	template <>  struct traits<std::vector< VectorXi, std::allocator< VectorXi > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "VectorXi" "," "std::allocator< VectorXi >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_VectorXi_Sg__iterator(std::vector< VectorXi > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_VectorXi_Sg____nonzero__(std::vector< VectorXi > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_VectorXi_Sg____bool__(std::vector< VectorXi > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< VectorXi >::size_type std_vector_Sl_VectorXi_Sg____len__(std::vector< VectorXi > const *self){
      return self->size();
    }
SWIGINTERN std::vector< VectorXi,std::allocator< VectorXi > > *std_vector_Sl_VectorXi_Sg____getslice__(std::vector< VectorXi > *self,std::vector< VectorXi >::difference_type i,std::vector< VectorXi >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg____setslice____SWIG_0(std::vector< VectorXi > *self,std::vector< VectorXi >::difference_type i,std::vector< VectorXi >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< VectorXi,std::allocator< VectorXi > >());
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg____setslice____SWIG_1(std::vector< VectorXi > *self,std::vector< VectorXi >::difference_type i,std::vector< VectorXi >::difference_type j,std::vector< VectorXi,std::allocator< VectorXi > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg____delslice__(std::vector< VectorXi > *self,std::vector< VectorXi >::difference_type i,std::vector< VectorXi >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg____delitem____SWIG_0(std::vector< VectorXi > *self,std::vector< VectorXi >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< VectorXi,std::allocator< VectorXi > > *std_vector_Sl_VectorXi_Sg____getitem____SWIG_0(std::vector< VectorXi > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< VectorXi,std::allocator< VectorXi > >::difference_type id = i;
      std::vector< VectorXi,std::allocator< VectorXi > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg____setitem____SWIG_0(std::vector< VectorXi > *self,PySliceObject *slice,std::vector< VectorXi,std::allocator< VectorXi > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< VectorXi,std::allocator< VectorXi > >::difference_type id = i;
      std::vector< VectorXi,std::allocator< VectorXi > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg____setitem____SWIG_1(std::vector< VectorXi > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< VectorXi,std::allocator< VectorXi > >::difference_type id = i;
      std::vector< VectorXi,std::allocator< VectorXi > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg____delitem____SWIG_1(std::vector< VectorXi > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< VectorXi,std::allocator< VectorXi > >::difference_type id = i;
      std::vector< VectorXi,std::allocator< VectorXi > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< VectorXi >::value_type const &std_vector_Sl_VectorXi_Sg____getitem____SWIG_1(std::vector< VectorXi > const *self,std::vector< VectorXi >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg____setitem____SWIG_2(std::vector< VectorXi > *self,std::vector< VectorXi >::difference_type i,std::vector< VectorXi >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< VectorXi >::value_type std_vector_Sl_VectorXi_Sg__pop(std::vector< VectorXi > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< VectorXi,std::allocator< VectorXi > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_VectorXi_Sg__append(std::vector< VectorXi > *self,std::vector< VectorXi >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< VectorXi >::iterator std_vector_Sl_VectorXi_Sg__erase__SWIG_0(std::vector< VectorXi > *self,std::vector< VectorXi >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< VectorXi >::iterator std_vector_Sl_VectorXi_Sg__erase__SWIG_1(std::vector< VectorXi > *self,std::vector< VectorXi >::iterator first,std::vector< VectorXi >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< VectorXi >::iterator std_vector_Sl_VectorXi_Sg__insert__SWIG_0(std::vector< VectorXi > *self,std::vector< VectorXi >::iterator pos,std::vector< VectorXi >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_VectorXi_Sg__insert__SWIG_1(std::vector< VectorXi > *self,std::vector< VectorXi >::iterator pos,std::vector< VectorXi >::size_type n,std::vector< VectorXi >::value_type const &x){ self->insert(pos, n, x); }

  #define SWIG_From_double   PyFloat_FromDouble 


SWIGINTERN int
SWIG_AsVal_bool (PyObject *obj, bool *val)
{
  int r;
  if (!PyBool_Check(obj))
    return SWIG_ERROR;
  r = PyObject_IsTrue(obj);
  if (r == -1)
    return SWIG_ERROR;
  if (val) *val = r ? true : false;
  return SWIG_OK;
}


#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


SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
{
  int res = SWIG_TypeError;
  if (PyLong_Check(obj)) {
    unsigned long long v = PyLong_AsUnsignedLongLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      res = SWIG_OverflowError;
    }
  } else {
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj,&v);
    if (SWIG_IsOK(res)) {
      if (val) *val = v;
      return res;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    const double mant_max = 1LL << DBL_MANT_DIG;
    double d;
    res = SWIG_AsVal_double (obj,&d);
    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
      if (val) *val = (unsigned long long)(d);
      return SWIG_AddCast(res);
    }
    res = SWIG_TypeError;
  }
#endif
  return res;
}


SWIGINTERNINLINE PyObject* 
SWIG_From_long_SS_long  (long long value)
{
  return ((value < LONG_MIN) || (value > LONG_MAX)) ?
    PyLong_FromLongLong(value) : PyLong_FromLong(static_cast< long >(value)); 
}


SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLongLong(value) : PyLong_FromLong(static_cast< long >(value)); 
}


SWIGINTERN int
SWIG_AsVal_int (PyObject * obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long (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 int
SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
{
  int res = SWIG_TypeError;
  if (PyLong_Check(obj)) {
    long long v = PyLong_AsLongLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      res = SWIG_OverflowError;
    }
  } else {
    long v;
    res = SWIG_AsVal_long (obj,&v);
    if (SWIG_IsOK(res)) {
      if (val) *val = v;
      return res;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    const double mant_max = 1LL << DBL_MANT_DIG;
    const double mant_min = -mant_max;
    double d;
    res = SWIG_AsVal_double (obj,&d);
    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
      if (val) *val = (long long)(d);
      return SWIG_AddCast(res);
    }
    res = SWIG_TypeError;
  }
#endif
  return res;
}


SWIGINTERNINLINE PyObject *
SWIG_From_float  (float value)
{    
  return SWIG_From_double  (value);
}

#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *SHARED_PTR_DISOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "SHARED_PTR_DISOWN",SWIG_From_int(static_cast< int >(0)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  delete arg1;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value();
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  try {
    result = (swig::SwigPyIterator *)(arg1)->incr(arg2);
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (swig::SwigPyIterator *)(arg1)->incr();
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_SwigPyIterator_incr__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_SwigPyIterator_incr__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    swig::SwigPyIterator::incr(size_t)\n"
    "    swig::SwigPyIterator::incr()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  try {
    result = (swig::SwigPyIterator *)(arg1)->decr(arg2);
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (swig::SwigPyIterator *)(arg1)->decr();
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_SwigPyIterator_decr__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_SwigPyIterator_decr__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    swig::SwigPyIterator::decr(size_t)\n"
    "    swig::SwigPyIterator::decr()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  try {
    result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2);
  }
  catch(std::invalid_argument &_e) {
    SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
  }
  
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  try {
    result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2);
  }
  catch(std::invalid_argument &_e) {
    SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
  }
  
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (PyObject *)(arg1)->next();
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (PyObject *)(arg1)->__next__();
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (PyObject *)(arg1)->previous();
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *)(arg1)->advance(arg2);
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2);
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2);
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2);
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2);
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2);
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_SwigPyIterator___sub____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_SwigPyIterator___sub____SWIG_0(self, args);
      }
    }
  }
  
fail:
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_MatrixXdVec_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_iterator",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_iterator" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_MatrixXd_Sg__iterator(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec___nonzero__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___nonzero__" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_MatrixXd_Sg____nonzero__((std::vector< MatrixXd > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec___bool__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___bool__" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_MatrixXd_Sg____bool__((std::vector< MatrixXd > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec___len__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___len__" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = std_vector_Sl_MatrixXd_Sg____len__((std::vector< MatrixXd > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::difference_type arg2 ;
  std::vector< MatrixXd >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< MatrixXd,std::allocator< MatrixXd > > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___getslice__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec___getslice__" "', argument " "2"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MatrixXdVec___getslice__" "', argument " "3"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< MatrixXd >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)std_vector_Sl_MatrixXd_Sg____getslice__(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::difference_type arg2 ;
  std::vector< MatrixXd >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___setslice__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec___setslice__" "', argument " "2"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MatrixXdVec___setslice__" "', argument " "3"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< MatrixXd >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_MatrixXd_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::difference_type arg2 ;
  std::vector< MatrixXd >::difference_type arg3 ;
  std::vector< MatrixXd,std::allocator< MatrixXd > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:MatrixXdVec___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___setslice__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec___setslice__" "', argument " "2"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MatrixXdVec___setslice__" "', argument " "3"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< MatrixXd >::difference_type >(val3);
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MatrixXdVec___setslice__" "', argument " "4"" of type '" "std::vector< MatrixXd,std::allocator< MatrixXd > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatrixXdVec___setslice__" "', argument " "4"" of type '" "std::vector< MatrixXd,std::allocator< MatrixXd > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_MatrixXd_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< MatrixXd,std::allocator< MatrixXd > > const &)*arg4);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_MatrixXdVec___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_MatrixXdVec___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MatrixXdVec___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< MatrixXd >::__setslice__(std::vector< MatrixXd >::difference_type,std::vector< MatrixXd >::difference_type)\n"
    "    std::vector< MatrixXd >::__setslice__(std::vector< MatrixXd >::difference_type,std::vector< MatrixXd >::difference_type,std::vector< MatrixXd,std::allocator< MatrixXd > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::difference_type arg2 ;
  std::vector< MatrixXd >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___delslice__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec___delslice__" "', argument " "2"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MatrixXdVec___delslice__" "', argument " "3"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< MatrixXd >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_MatrixXd_Sg____delslice__(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec___delitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___delitem__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec___delitem__" "', argument " "2"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_MatrixXd_Sg____delitem____SWIG_0(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< MatrixXd,std::allocator< MatrixXd > > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec___getitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___getitem__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)std_vector_Sl_MatrixXd_Sg____getitem____SWIG_0(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< MatrixXd,std::allocator< MatrixXd > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___setitem__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MatrixXdVec___setitem__" "', argument " "3"" of type '" "std::vector< MatrixXd,std::allocator< MatrixXd > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatrixXdVec___setitem__" "', argument " "3"" of type '" "std::vector< MatrixXd,std::allocator< MatrixXd > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_MatrixXd_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< MatrixXd,std::allocator< MatrixXd > > const &)*arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec___setitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___setitem__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_MatrixXd_Sg____setitem____SWIG_1(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec___delitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___delitem__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_MatrixXd_Sg____delitem____SWIG_1(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_MatrixXdVec___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_MatrixXdVec___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MatrixXdVec___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< MatrixXd >::__delitem__(std::vector< MatrixXd >::difference_type)\n"
    "    std::vector< MatrixXd >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< MatrixXd >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec___getitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___getitem__" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec___getitem__" "', argument " "2"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< MatrixXd >::value_type *) &std_vector_Sl_MatrixXd_Sg____getitem____SWIG_1((std::vector< MatrixXd > const *)arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_MatrixXdVec___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_MatrixXdVec___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MatrixXdVec___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< MatrixXd >::__getitem__(PySliceObject *)\n"
    "    std::vector< MatrixXd >::__getitem__(std::vector< MatrixXd >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::difference_type arg2 ;
  std::vector< MatrixXd >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec___setitem__" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec___setitem__" "', argument " "2"" of type '" "std::vector< MatrixXd >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::difference_type >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      try {
        std_vector_Sl_MatrixXd_Sg____setitem____SWIG_2(arg1,arg2,(MatrixXd const &)*arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_MatrixXdVec___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_MatrixXdVec___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_MatrixXdVec___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MatrixXdVec___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< MatrixXd >::__setitem__(PySliceObject *,std::vector< MatrixXd,std::allocator< MatrixXd > > const &)\n"
    "    std::vector< MatrixXd >::__setitem__(PySliceObject *)\n"
    "    std::vector< MatrixXd >::__setitem__(std::vector< MatrixXd >::difference_type,std::vector< MatrixXd >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::value_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_pop",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_pop" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_MatrixXd_Sg__pop(arg1);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< MatrixXd >::value_type(static_cast< const std::vector< MatrixXd >::value_type& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec_append",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_append" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      std_vector_Sl_MatrixXd_Sg__append(arg1,(MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MatrixXdVec__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_MatrixXdVec")) SWIG_fail;
  {
    try {
      result = (std::vector< MatrixXd > *)new std::vector< MatrixXd >();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MatrixXdVec__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_MatrixXdVec",&obj0)) SWIG_fail;
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MatrixXdVec" "', argument " "1"" of type '" "std::vector< MatrixXd > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MatrixXdVec" "', argument " "1"" of type '" "std::vector< MatrixXd > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< MatrixXd > *)new std::vector< MatrixXd >((std::vector< MatrixXd > const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_empty",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_empty" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (bool)((std::vector< MatrixXd > const *)arg1)->empty();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_size",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_size" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = ((std::vector< MatrixXd > const *)arg1)->size();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec_swap",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_swap" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MatrixXdVec_swap" "', argument " "2"" of type '" "std::vector< MatrixXd > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatrixXdVec_swap" "', argument " "2"" of type '" "std::vector< MatrixXd > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< MatrixXd > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_begin",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_begin" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_end",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_end" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::reverse_iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_rbegin",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_rbegin" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< MatrixXd >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::reverse_iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_rend",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_rend" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< MatrixXd >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_clear",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_clear" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< MatrixXd > > result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_get_allocator",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_get_allocator" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = ((std::vector< MatrixXd > const *)arg1)->get_allocator();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< MatrixXd >::allocator_type(static_cast< const std::vector< MatrixXd >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_MatrixXd_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MatrixXdVec__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_MatrixXdVec",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MatrixXdVec" "', argument " "1"" of type '" "std::vector< MatrixXd >::size_type""'");
  } 
  arg1 = static_cast< std::vector< MatrixXd >::size_type >(val1);
  {
    try {
      result = (std::vector< MatrixXd > *)new std::vector< MatrixXd >(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_pop_back",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_pop_back" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec_resize",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_resize" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec_resize" "', argument " "2"" of type '" "std::vector< MatrixXd >::size_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec_erase",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_erase" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_erase" "', argument " "2"" of type '" "std::vector< MatrixXd >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_erase" "', argument " "2"" of type '" "std::vector< MatrixXd >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_MatrixXd_Sg__erase__SWIG_0(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::iterator arg2 ;
  std::vector< MatrixXd >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec_erase",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_erase" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_erase" "', argument " "2"" of type '" "std::vector< MatrixXd >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_erase" "', argument " "2"" of type '" "std::vector< MatrixXd >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_erase" "', argument " "3"" of type '" "std::vector< MatrixXd >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_erase" "', argument " "3"" of type '" "std::vector< MatrixXd >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_MatrixXd_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_MatrixXdVec_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_MatrixXdVec_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MatrixXdVec_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< MatrixXd >::erase(std::vector< MatrixXd >::iterator)\n"
    "    std::vector< MatrixXd >::erase(std::vector< MatrixXd >::iterator,std::vector< MatrixXd >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_MatrixXdVec__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd >::size_type arg1 ;
  std::vector< MatrixXd >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_MatrixXdVec",&obj0,&obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MatrixXdVec" "', argument " "1"" of type '" "std::vector< MatrixXd >::size_type""'");
  } 
  arg1 = static_cast< std::vector< MatrixXd >::size_type >(val1);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (std::vector< MatrixXd > *)new std::vector< MatrixXd >(arg1,(std::vector< MatrixXd >::value_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MatrixXdVec(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_MatrixXdVec__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_MatrixXdVec__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_MatrixXdVec__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_new_MatrixXdVec__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MatrixXdVec'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< MatrixXd >::vector()\n"
    "    std::vector< MatrixXd >::vector(std::vector< MatrixXd > const &)\n"
    "    std::vector< MatrixXd >::vector(std::vector< MatrixXd >::size_type)\n"
    "    std::vector< MatrixXd >::vector(std::vector< MatrixXd >::size_type,std::vector< MatrixXd >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec_push_back",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_push_back" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->push_back((std::vector< MatrixXd >::value_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_front",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_front" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (std::vector< MatrixXd >::value_type *) &((std::vector< MatrixXd > const *)arg1)->front();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_back",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_back" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = (std::vector< MatrixXd >::value_type *) &((std::vector< MatrixXd > const *)arg1)->back();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::size_type arg2 ;
  std::vector< MatrixXd >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec_assign",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_assign" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec_assign" "', argument " "2"" of type '" "std::vector< MatrixXd >::size_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::size_type >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->assign(arg2,(std::vector< MatrixXd >::value_type const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::size_type arg2 ;
  std::vector< MatrixXd >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec_resize",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_resize" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec_resize" "', argument " "2"" of type '" "std::vector< MatrixXd >::size_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::size_type >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->resize(arg2,(std::vector< MatrixXd >::value_type const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_MatrixXdVec_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_MatrixXdVec_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MatrixXdVec_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< MatrixXd >::resize(std::vector< MatrixXd >::size_type)\n"
    "    std::vector< MatrixXd >::resize(std::vector< MatrixXd >::size_type,std::vector< MatrixXd >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::iterator arg2 ;
  std::vector< MatrixXd >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:MatrixXdVec_insert",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_insert" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_insert" "', argument " "2"" of type '" "std::vector< MatrixXd >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_insert" "', argument " "2"" of type '" "std::vector< MatrixXd >::iterator""'");
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = std_vector_Sl_MatrixXd_Sg__insert__SWIG_0(arg1,arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::iterator arg2 ;
  std::vector< MatrixXd >::size_type arg3 ;
  std::vector< MatrixXd >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  MatrixXd temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:MatrixXdVec_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_insert" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_insert" "', argument " "2"" of type '" "std::vector< MatrixXd >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MatrixXdVec_insert" "', argument " "2"" of type '" "std::vector< MatrixXd >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MatrixXdVec_insert" "', argument " "3"" of type '" "std::vector< MatrixXd >::size_type""'");
  } 
  arg3 = static_cast< std::vector< MatrixXd >::size_type >(val3);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      std_vector_Sl_MatrixXd_Sg__insert__SWIG_1(arg1,arg2,arg3,(MatrixXd const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter) != 0));
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_MatrixXdVec_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< MatrixXd >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            return _wrap_MatrixXdVec_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MatrixXdVec_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< MatrixXd >::insert(std::vector< MatrixXd >::iterator,std::vector< MatrixXd >::value_type const &)\n"
    "    std::vector< MatrixXd >::insert(std::vector< MatrixXd >::iterator,std::vector< MatrixXd >::size_type,std::vector< MatrixXd >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  std::vector< MatrixXd >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MatrixXdVec_reserve",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_reserve" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MatrixXdVec_reserve" "', argument " "2"" of type '" "std::vector< MatrixXd >::size_type""'");
  } 
  arg2 = static_cast< std::vector< MatrixXd >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatrixXdVec_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< MatrixXd >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MatrixXdVec_capacity",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatrixXdVec_capacity" "', argument " "1"" of type '" "std::vector< MatrixXd > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      result = ((std::vector< MatrixXd > const *)arg1)->capacity();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_MatrixXdVec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< MatrixXd > *arg1 = (std::vector< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_MatrixXdVec",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatrixXdVec" "', argument " "1"" of type '" "std::vector< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< MatrixXd > * >(argp1);
  {
    try {
      delete arg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *MatrixXdVec_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_StringVec_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_iterator",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_iterator" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_std_string_Sg__iterator(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec___nonzero__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___nonzero__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_std_string_Sg____nonzero__((std::vector< std::string > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec___bool__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___bool__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_std_string_Sg____bool__((std::vector< std::string > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec___len__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___len__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = std_vector_Sl_std_string_Sg____len__((std::vector< std::string > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::difference_type arg2 ;
  std::vector< std::string >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< std::string,std::allocator< std::string > > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___getslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec___getslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVec___getslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< std::string >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getslice__(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::difference_type arg2 ;
  std::vector< std::string >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___setslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec___setslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVec___setslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< std::string >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_std_string_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::difference_type arg2 ;
  std::vector< std::string >::difference_type arg3 ;
  std::vector< std::string,std::allocator< std::string > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:StringVec___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___setslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec___setslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVec___setslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< std::string >::difference_type >(val3);
  {
    std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "StringVec___setslice__" "', argument " "4"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec___setslice__" "', argument " "4"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_std_string_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< std::string,std::allocator< std::string > > const &)*arg4);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_StringVec___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< std::string,std::allocator< std::string > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_StringVec___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringVec___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::string >::__setslice__(std::vector< std::string >::difference_type,std::vector< std::string >::difference_type)\n"
    "    std::vector< std::string >::__setslice__(std::vector< std::string >::difference_type,std::vector< std::string >::difference_type,std::vector< std::string,std::allocator< std::string > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringVec___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::difference_type arg2 ;
  std::vector< std::string >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___delslice__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec___delslice__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVec___delslice__" "', argument " "3"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< std::string >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_std_string_Sg____delslice__(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec___delitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___delitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec___delitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_std_string_Sg____delitem____SWIG_0(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< std::string,std::allocator< std::string > > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec___getitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___getitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< std::string,std::allocator< std::string > > *)std_vector_Sl_std_string_Sg____getitem____SWIG_0(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< std::string,std::allocator< std::string > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVec___setitem__" "', argument " "3"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec___setitem__" "', argument " "3"" of type '" "std::vector< std::string,std::allocator< std::string > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_std_string_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< std::string,std::allocator< std::string > > const &)*arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec___setitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_std_string_Sg____setitem____SWIG_1(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec___delitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___delitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_std_string_Sg____delitem____SWIG_1(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_StringVec___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_StringVec___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringVec___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::string >::__delitem__(std::vector< std::string >::difference_type)\n"
    "    std::vector< std::string >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringVec___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< std::string >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec___getitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___getitem__" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec___getitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< std::string >::value_type *) &std_vector_Sl_std_string_Sg____getitem____SWIG_1((std::vector< std::string > const *)arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_StringVec___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_StringVec___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringVec___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::string >::__getitem__(PySliceObject *)\n"
    "    std::vector< std::string >::__getitem__(std::vector< std::string >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringVec___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::difference_type arg2 ;
  std::vector< std::string >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec___setitem__" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec___setitem__" "', argument " "2"" of type '" "std::vector< std::string >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::difference_type >(val2);
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVec___setitem__" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec___setitem__" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_std_string_Sg____setitem____SWIG_2(arg1,arg2,(std::string const &)*arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_StringVec___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< std::string,std::allocator< std::string > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_StringVec___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_StringVec___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringVec___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::string >::__setitem__(PySliceObject *,std::vector< std::string,std::allocator< std::string > > const &)\n"
    "    std::vector< std::string >::__setitem__(PySliceObject *)\n"
    "    std::vector< std::string >::__setitem__(std::vector< std::string >::difference_type,std::vector< std::string >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringVec_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::value_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_pop",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_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) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec_append",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_append" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVec_append" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec_append" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      std_vector_Sl_std_string_Sg__append(arg1,(std::string const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringVec__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_StringVec")) SWIG_fail;
  {
    try {
      result = (std::vector< std::string > *)new std::vector< std::string >();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringVec__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< std::string > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_StringVec",&obj0)) SWIG_fail;
  {
    std::vector< std::string,std::allocator< std::string > > *ptr = (std::vector< std::string,std::allocator< std::string > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringVec" "', argument " "1"" of type '" "std::vector< std::string > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringVec" "', argument " "1"" of type '" "std::vector< std::string > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< std::string > *)new std::vector< std::string >((std::vector< std::string > const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_empty",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_empty" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (bool)((std::vector< std::string > const *)arg1)->empty();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_size",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_size" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = ((std::vector< std::string > const *)arg1)->size();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec_swap",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_swap" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVec_swap" "', argument " "2"" of type '" "std::vector< std::string > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec_swap" "', argument " "2"" of type '" "std::vector< std::string > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< std::string > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_begin",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_begin" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_end",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_end" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::reverse_iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_rbegin",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_rbegin" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::reverse_iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_rend",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_rend" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_clear",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_clear" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< std::string > > result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_get_allocator",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_get_allocator" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = ((std::vector< std::string > const *)arg1)->get_allocator();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< std::string >::allocator_type(static_cast< const std::vector< std::string >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__string_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringVec__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_StringVec",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringVec" "', argument " "1"" of type '" "std::vector< std::string >::size_type""'");
  } 
  arg1 = static_cast< std::vector< std::string >::size_type >(val1);
  {
    try {
      result = (std::vector< std::string > *)new std::vector< std::string >(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_pop_back",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_pop_back" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec_resize",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_resize" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec_resize" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< std::string >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec_erase",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_erase" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_std_string_Sg__erase__SWIG_0(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::iterator arg2 ;
  std::vector< std::string >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< std::string >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec_erase",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_erase" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_erase" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_erase" "', argument " "3"" of type '" "std::vector< std::string >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_erase" "', argument " "3"" of type '" "std::vector< std::string >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_std_string_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_StringVec_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_StringVec_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringVec_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::string >::erase(std::vector< std::string >::iterator)\n"
    "    std::vector< std::string >::erase(std::vector< std::string >::iterator,std::vector< std::string >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_StringVec__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string >::size_type arg1 ;
  std::vector< std::string >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< std::string > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_StringVec",&obj0,&obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringVec" "', argument " "1"" of type '" "std::vector< std::string >::size_type""'");
  } 
  arg1 = static_cast< std::vector< std::string >::size_type >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StringVec" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringVec" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (std::vector< std::string > *)new std::vector< std::string >(arg1,(std::vector< std::string >::value_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringVec(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_StringVec__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_StringVec__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_StringVec__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_StringVec__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_StringVec'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::string >::vector()\n"
    "    std::vector< std::string >::vector(std::vector< std::string > const &)\n"
    "    std::vector< std::string >::vector(std::vector< std::string >::size_type)\n"
    "    std::vector< std::string >::vector(std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringVec_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec_push_back",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_push_back" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringVec_push_back" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec_push_back" "', argument " "2"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->push_back((std::vector< std::string >::value_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_front",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_front" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (std::vector< std::string >::value_type *) &((std::vector< std::string > const *)arg1)->front();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_back",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_back" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = (std::vector< std::string >::value_type *) &((std::vector< std::string > const *)arg1)->back();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::size_type arg2 ;
  std::vector< std::string >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec_assign",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_assign" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec_assign" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::size_type >(val2);
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVec_assign" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec_assign" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->assign(arg2,(std::vector< std::string >::value_type const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::size_type arg2 ;
  std::vector< std::string >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec_resize",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_resize" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec_resize" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::size_type >(val2);
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVec_resize" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec_resize" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->resize(arg2,(std::vector< std::string >::value_type const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_StringVec_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_StringVec_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringVec_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::string >::resize(std::vector< std::string >::size_type)\n"
    "    std::vector< std::string >::resize(std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringVec_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::iterator arg2 ;
  std::vector< std::string >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< std::string >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringVec_insert",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_insert" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'");
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringVec_insert" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec_insert" "', argument " "3"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = std_vector_Sl_std_string_Sg__insert__SWIG_0(arg1,arg2,(std::string const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::string >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::iterator arg2 ;
  std::vector< std::string >::size_type arg3 ;
  std::vector< std::string >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:StringVec_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_insert" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::string >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringVec_insert" "', argument " "2"" of type '" "std::vector< std::string >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StringVec_insert" "', argument " "3"" of type '" "std::vector< std::string >::size_type""'");
  } 
  arg3 = static_cast< std::vector< std::string >::size_type >(val3);
  {
    std::string *ptr = (std::string *)0;
    res4 = SWIG_AsPtr_std_string(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "StringVec_insert" "', argument " "4"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringVec_insert" "', argument " "4"" of type '" "std::vector< std::string >::value_type const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      std_vector_Sl_std_string_Sg__insert__SWIG_1(arg1,arg2,arg3,(std::string const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0));
      if (_v) {
        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_StringVec_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::string,std::allocator< std::string > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::string >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_StringVec_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringVec_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::string >::insert(std::vector< std::string >::iterator,std::vector< std::string >::value_type const &)\n"
    "    std::vector< std::string >::insert(std::vector< std::string >::iterator,std::vector< std::string >::size_type,std::vector< std::string >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringVec_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  std::vector< std::string >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringVec_reserve",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_reserve" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StringVec_reserve" "', argument " "2"" of type '" "std::vector< std::string >::size_type""'");
  } 
  arg2 = static_cast< std::vector< std::string >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringVec_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringVec_capacity",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringVec_capacity" "', argument " "1"" of type '" "std::vector< std::string > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      result = ((std::vector< std::string > const *)arg1)->capacity();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_StringVec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_StringVec",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringVec" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
  {
    try {
      delete arg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *StringVec_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_StringMatrixMap__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::less< std::string > *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::map< std::string,MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_StringMatrixMap",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__lessT_std__string_t,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringMatrixMap" "', argument " "1"" of type '" "std::less< std::string > const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringMatrixMap" "', argument " "1"" of type '" "std::less< std::string > const &""'"); 
  }
  arg1 = reinterpret_cast< std::less< std::string > * >(argp1);
  {
    try {
      result = (std::map< std::string,MatrixXd > *)new std::map< std::string,MatrixXd >((std::less< std::string > const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  std::map<std::string,MatrixXd> > *smartresult = result ? new std::shared_ptr<  std::map<std::string,MatrixXd> >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_iterator",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_iterator" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_MatrixXd_Sg__iterator(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap___nonzero__",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap___nonzero__" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)std_map_Sl_std_string_Sc_MatrixXd_Sg____nonzero__((std::map< std::string,MatrixXd > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap___bool__",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap___bool__" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)std_map_Sl_std_string_Sc_MatrixXd_Sg____bool__((std::map< std::string,MatrixXd > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::map< std::string,MatrixXd >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap___len__",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap___len__" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = std_map_Sl_std_string_Sc_MatrixXd_Sg____len__((std::map< std::string,MatrixXd > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::map< std::string,MatrixXd >::mapped_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap___getitem__",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap___getitem__" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap___getitem__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap___getitem__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      try {
        result = (std::map< std::string,MatrixXd >::mapped_type *) &std_map_Sl_std_string_Sc_MatrixXd_Sg____getitem__(arg1,(std::string const &)*arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap___delitem__",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap___delitem__" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap___delitem__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap___delitem__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      try {
        std_map_Sl_std_string_Sc_MatrixXd_Sg____delitem__(arg1,(std::string const &)*arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_has_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap_has_key",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_has_key" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap_has_key" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap_has_key" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (bool)std_map_Sl_std_string_Sc_MatrixXd_Sg__has_key((std::map< std::string,MatrixXd > const *)arg1,(std::string const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_keys",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_keys" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (PyObject *)std_map_Sl_std_string_Sc_MatrixXd_Sg__keys(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_values",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_values" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (PyObject *)std_map_Sl_std_string_Sc_MatrixXd_Sg__values(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_items(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_items",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_items" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (PyObject *)std_map_Sl_std_string_Sc_MatrixXd_Sg__items(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap___contains__",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap___contains__" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap___contains__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap___contains__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (bool)std_map_Sl_std_string_Sc_MatrixXd_Sg____contains__(arg1,(std::string const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_key_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_key_iterator",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_key_iterator" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_MatrixXd_Sg__key_iterator(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_value_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_value_iterator",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_value_iterator" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (swig::SwigPyIterator *)std_map_Sl_std_string_Sc_MatrixXd_Sg__value_iterator(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap___setitem__",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap___setitem__" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap___setitem__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap___setitem__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      std_map_Sl_std_string_Sc_MatrixXd_Sg____setitem____SWIG_0(arg1,(std::string const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  std::map< std::string,MatrixXd >::mapped_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringMatrixMap___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap___setitem__" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap___setitem__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap___setitem__" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      try {
        std_map_Sl_std_string_Sc_MatrixXd_Sg____setitem____SWIG_1(arg1,(std::string const &)*arg2,(MatrixXd const &)*arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_StringMatrixMap___setitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_StringMatrixMap___setitem____SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringMatrixMap___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::map< std::string,MatrixXd >::__setitem__(std::map< std::string,MatrixXd >::key_type const &)\n"
    "    std::map< std::string,MatrixXd >::__setitem__(std::map< std::string,MatrixXd >::key_type const &,std::map< std::string,MatrixXd >::mapped_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_asdict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_asdict",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_asdict" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (PyObject *)std_map_Sl_std_string_Sc_MatrixXd_Sg__asdict(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringMatrixMap__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_StringMatrixMap")) SWIG_fail;
  {
    try {
      result = (std::map< std::string,MatrixXd > *)new std::map< std::string,MatrixXd >();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  std::map<std::string,MatrixXd> > *smartresult = result ? new std::shared_ptr<  std::map<std::string,MatrixXd> >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringMatrixMap__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::map< std::string,MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_StringMatrixMap",&obj0)) SWIG_fail;
  {
    std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > > *ptr = (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringMatrixMap" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringMatrixMap" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::map< std::string,MatrixXd > *)new std::map< std::string,MatrixXd >((std::map< std::string,MatrixXd > const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  std::map<std::string,MatrixXd> > *smartresult = result ? new std::shared_ptr<  std::map<std::string,MatrixXd> >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringMatrixMap(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_StringMatrixMap__SWIG_1(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_std__string_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_StringMatrixMap__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_StringMatrixMap__SWIG_2(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_StringMatrixMap'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::map< std::string,MatrixXd >::map(std::less< std::string > const &)\n"
    "    std::map< std::string,MatrixXd >::map()\n"
    "    std::map< std::string,MatrixXd >::map(std::map< std::string,MatrixXd > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_empty",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_empty" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)((std::map< std::string,MatrixXd > const *)arg1)->empty();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::map< std::string,MatrixXd >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_size",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_size" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((std::map< std::string,MatrixXd > const *)arg1)->size();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap_swap",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_swap" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap_swap" "', argument " "2"" of type '" "std::map< std::string,MatrixXd > &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap_swap" "', argument " "2"" of type '" "std::map< std::string,MatrixXd > &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp2);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp2);
      arg2 = const_cast< std::map< std::string,MatrixXd > * >(tempshared2.get());
    } else {
      arg2 = const_cast< std::map< std::string,MatrixXd > * >(reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp2)->get());
    }
  }
  {
    try {
      (arg1)->swap(*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::map< std::string,MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_begin",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_begin" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->begin();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::map< std::string,MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_end",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_end" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->end();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::map< std::string,MatrixXd >::reverse_iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_rbegin",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_rbegin" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->rbegin();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,MatrixXd >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::map< std::string,MatrixXd >::reverse_iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_rend",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_rend" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->rend();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,MatrixXd >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_clear",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_clear" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->clear();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< std::pair< std::string const,MatrixXd > > > result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StringMatrixMap_get_allocator",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_get_allocator" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((std::map< std::string,MatrixXd > const *)arg1)->get_allocator();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new std::map< std::string,MatrixXd >::allocator_type(static_cast< const std::map< std::string,MatrixXd >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::map< std::string,MatrixXd >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap_erase",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_erase" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap_erase" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap_erase" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (arg1)->erase((std::map< std::string,MatrixXd >::key_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > const > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::map< std::string,MatrixXd >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap_count",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_count" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap_count" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap_count" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((std::map< std::string,MatrixXd > const *)arg1)->count((std::map< std::string,MatrixXd >::key_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap_erase",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_erase" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringMatrixMap_erase" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringMatrixMap_erase" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::iterator""'");
    }
  }
  {
    try {
      std_map_Sl_std_string_Sc_MatrixXd_Sg__erase__SWIG_1(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_erase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::iterator arg2 ;
  std::map< std::string,MatrixXd >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StringMatrixMap_erase",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_erase" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringMatrixMap_erase" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringMatrixMap_erase" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringMatrixMap_erase" "', argument " "3"" of type '" "std::map< std::string,MatrixXd >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "StringMatrixMap_erase" "', argument " "3"" of type '" "std::map< std::string,MatrixXd >::iterator""'");
    }
  }
  {
    try {
      std_map_Sl_std_string_Sc_MatrixXd_Sg__erase__SWIG_2(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_StringMatrixMap_erase__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_StringMatrixMap_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::map< std::string,MatrixXd >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_StringMatrixMap_erase__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'StringMatrixMap_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::map< std::string,MatrixXd >::erase(std::map< std::string,MatrixXd >::key_type const &)\n"
    "    std::map< std::string,MatrixXd >::erase(std::map< std::string,MatrixXd >::iterator)\n"
    "    std::map< std::string,MatrixXd >::erase(std::map< std::string,MatrixXd >::iterator,std::map< std::string,MatrixXd >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::map< std::string,MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap_find",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_find" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap_find" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap_find" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (arg1)->find((std::map< std::string,MatrixXd >::key_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::map< std::string,MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap_lower_bound",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_lower_bound" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap_lower_bound" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap_lower_bound" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (arg1)->lower_bound((std::map< std::string,MatrixXd >::key_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StringMatrixMap_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  std::map< std::string,MatrixXd >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::map< std::string,MatrixXd >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StringMatrixMap_upper_bound",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringMatrixMap_upper_bound" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringMatrixMap_upper_bound" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringMatrixMap_upper_bound" "', argument " "2"" of type '" "std::map< std::string,MatrixXd >::key_type const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (arg1)->upper_bound((std::map< std::string,MatrixXd >::key_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< std::string,MatrixXd >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_StringMatrixMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::map< std::string,MatrixXd > *arg1 = (std::map< std::string,MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > tempshared1 ;
  std::shared_ptr< std::map< std::string,MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_StringMatrixMap",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringMatrixMap" "', argument " "1"" of type '" "std::map< std::string,MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  std::map<std::string,MatrixXd> > * >(argp1);
      arg1 = const_cast< std::map< std::string,MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *StringMatrixMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_VectorXiVec_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_iterator",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_iterator" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_VectorXi_Sg__iterator(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec___nonzero__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___nonzero__" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_VectorXi_Sg____nonzero__((std::vector< VectorXi > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec___bool__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___bool__" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_VectorXi_Sg____bool__((std::vector< VectorXi > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec___len__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___len__" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = std_vector_Sl_VectorXi_Sg____len__((std::vector< VectorXi > const *)arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::difference_type arg2 ;
  std::vector< VectorXi >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< VectorXi,std::allocator< VectorXi > > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec___getslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___getslice__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec___getslice__" "', argument " "2"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorXiVec___getslice__" "', argument " "3"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< VectorXi >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< VectorXi,std::allocator< VectorXi > > *)std_vector_Sl_VectorXi_Sg____getslice__(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::difference_type arg2 ;
  std::vector< VectorXi >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec___setslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___setslice__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec___setslice__" "', argument " "2"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorXiVec___setslice__" "', argument " "3"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< VectorXi >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_VectorXi_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::difference_type arg2 ;
  std::vector< VectorXi >::difference_type arg3 ;
  std::vector< VectorXi,std::allocator< VectorXi > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorXiVec___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___setslice__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec___setslice__" "', argument " "2"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorXiVec___setslice__" "', argument " "3"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< VectorXi >::difference_type >(val3);
  {
    std::vector< VectorXi,std::allocator< VectorXi > > *ptr = (std::vector< VectorXi,std::allocator< VectorXi > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VectorXiVec___setslice__" "', argument " "4"" of type '" "std::vector< VectorXi,std::allocator< VectorXi > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VectorXiVec___setslice__" "', argument " "4"" of type '" "std::vector< VectorXi,std::allocator< VectorXi > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_VectorXi_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< VectorXi,std::allocator< VectorXi > > const &)*arg4);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_VectorXiVec___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_VectorXiVec___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VectorXiVec___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< VectorXi >::__setslice__(std::vector< VectorXi >::difference_type,std::vector< VectorXi >::difference_type)\n"
    "    std::vector< VectorXi >::__setslice__(std::vector< VectorXi >::difference_type,std::vector< VectorXi >::difference_type,std::vector< VectorXi,std::allocator< VectorXi > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::difference_type arg2 ;
  std::vector< VectorXi >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec___delslice__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___delslice__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec___delslice__" "', argument " "2"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorXiVec___delslice__" "', argument " "3"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< VectorXi >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_VectorXi_Sg____delslice__(arg1,arg2,arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec___delitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___delitem__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec___delitem__" "', argument " "2"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_VectorXi_Sg____delitem____SWIG_0(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< VectorXi,std::allocator< VectorXi > > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec___getitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___getitem__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< VectorXi,std::allocator< VectorXi > > *)std_vector_Sl_VectorXi_Sg____getitem____SWIG_0(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< VectorXi,std::allocator< VectorXi > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___setitem__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< VectorXi,std::allocator< VectorXi > > *ptr = (std::vector< VectorXi,std::allocator< VectorXi > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorXiVec___setitem__" "', argument " "3"" of type '" "std::vector< VectorXi,std::allocator< VectorXi > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VectorXiVec___setitem__" "', argument " "3"" of type '" "std::vector< VectorXi,std::allocator< VectorXi > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_VectorXi_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< VectorXi,std::allocator< VectorXi > > const &)*arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec___setitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___setitem__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_VectorXi_Sg____setitem____SWIG_1(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec___delitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___delitem__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_VectorXi_Sg____delitem____SWIG_1(arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_VectorXiVec___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_VectorXiVec___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VectorXiVec___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< VectorXi >::__delitem__(std::vector< VectorXi >::difference_type)\n"
    "    std::vector< VectorXi >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< VectorXi >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec___getitem__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___getitem__" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec___getitem__" "', argument " "2"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< VectorXi >::value_type *) &std_vector_Sl_VectorXi_Sg____getitem____SWIG_1((std::vector< VectorXi > const *)arg1,arg2);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VectorXi, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_VectorXiVec___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_VectorXiVec___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VectorXiVec___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< VectorXi >::__getitem__(PySliceObject *)\n"
    "    std::vector< VectorXi >::__getitem__(std::vector< VectorXi >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::difference_type arg2 ;
  std::vector< VectorXi >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  VectorXi temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec___setitem__" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec___setitem__" "', argument " "2"" of type '" "std::vector< VectorXi >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::difference_type >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg3) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      try {
        std_vector_Sl_VectorXi_Sg____setitem____SWIG_2(arg1,arg2,(VectorXi const &)*arg3);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_VectorXiVec___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_VectorXiVec___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_VectorXi, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_VectorXiVec___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VectorXiVec___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< VectorXi >::__setitem__(PySliceObject *,std::vector< VectorXi,std::allocator< VectorXi > > const &)\n"
    "    std::vector< VectorXi >::__setitem__(PySliceObject *)\n"
    "    std::vector< VectorXi >::__setitem__(std::vector< VectorXi >::difference_type,std::vector< VectorXi >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::value_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_pop",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_pop" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_VectorXi_Sg__pop(arg1);
      }
      catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
      
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< VectorXi >::value_type(static_cast< const std::vector< VectorXi >::value_type& >(result))), SWIGTYPE_p_VectorXi, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  VectorXi temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec_append",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_append" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg2) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      std_vector_Sl_VectorXi_Sg__append(arg1,(VectorXi const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_VectorXiVec__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_VectorXiVec")) SWIG_fail;
  {
    try {
      result = (std::vector< VectorXi > *)new std::vector< VectorXi >();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_VectorXiVec__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_VectorXiVec",&obj0)) SWIG_fail;
  {
    std::vector< VectorXi,std::allocator< VectorXi > > *ptr = (std::vector< VectorXi,std::allocator< VectorXi > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VectorXiVec" "', argument " "1"" of type '" "std::vector< VectorXi > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VectorXiVec" "', argument " "1"" of type '" "std::vector< VectorXi > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< VectorXi > *)new std::vector< VectorXi >((std::vector< VectorXi > const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_empty",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_empty" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (bool)((std::vector< VectorXi > const *)arg1)->empty();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_size",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_size" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = ((std::vector< VectorXi > const *)arg1)->size();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec_swap",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_swap" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorXiVec_swap" "', argument " "2"" of type '" "std::vector< VectorXi > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VectorXiVec_swap" "', argument " "2"" of type '" "std::vector< VectorXi > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< VectorXi > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_begin",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_begin" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< VectorXi >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_end",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_end" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< VectorXi >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::reverse_iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_rbegin",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_rbegin" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< VectorXi >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::reverse_iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_rend",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_rend" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< VectorXi >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_clear",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_clear" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< VectorXi > > result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_get_allocator",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_get_allocator" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = ((std::vector< VectorXi > const *)arg1)->get_allocator();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< VectorXi >::allocator_type(static_cast< const std::vector< VectorXi >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_VectorXi_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_VectorXiVec__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_VectorXiVec",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VectorXiVec" "', argument " "1"" of type '" "std::vector< VectorXi >::size_type""'");
  } 
  arg1 = static_cast< std::vector< VectorXi >::size_type >(val1);
  {
    try {
      result = (std::vector< VectorXi > *)new std::vector< VectorXi >(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_pop_back",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_pop_back" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec_resize",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_resize" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec_resize" "', argument " "2"" of type '" "std::vector< VectorXi >::size_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< VectorXi >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec_erase",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_erase" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_erase" "', argument " "2"" of type '" "std::vector< VectorXi >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_erase" "', argument " "2"" of type '" "std::vector< VectorXi >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_VectorXi_Sg__erase__SWIG_0(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< VectorXi >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::iterator arg2 ;
  std::vector< VectorXi >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< VectorXi >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec_erase",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_erase" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_erase" "', argument " "2"" of type '" "std::vector< VectorXi >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_erase" "', argument " "2"" of type '" "std::vector< VectorXi >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_erase" "', argument " "3"" of type '" "std::vector< VectorXi >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_erase" "', argument " "3"" of type '" "std::vector< VectorXi >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_VectorXi_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< VectorXi >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_VectorXiVec_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_VectorXiVec_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VectorXiVec_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< VectorXi >::erase(std::vector< VectorXi >::iterator)\n"
    "    std::vector< VectorXi >::erase(std::vector< VectorXi >::iterator,std::vector< VectorXi >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_VectorXiVec__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi >::size_type arg1 ;
  std::vector< VectorXi >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  VectorXi temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< VectorXi > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_VectorXiVec",&obj0,&obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VectorXiVec" "', argument " "1"" of type '" "std::vector< VectorXi >::size_type""'");
  } 
  arg1 = static_cast< std::vector< VectorXi >::size_type >(val1);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg2) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (std::vector< VectorXi > *)new std::vector< VectorXi >(arg1,(std::vector< VectorXi >::value_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_VectorXiVec(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_VectorXiVec__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_VectorXiVec__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_VectorXiVec__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXi, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_VectorXiVec__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VectorXiVec'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< VectorXi >::vector()\n"
    "    std::vector< VectorXi >::vector(std::vector< VectorXi > const &)\n"
    "    std::vector< VectorXi >::vector(std::vector< VectorXi >::size_type)\n"
    "    std::vector< VectorXi >::vector(std::vector< VectorXi >::size_type,std::vector< VectorXi >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  VectorXi temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec_push_back",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_push_back" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg2) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->push_back((std::vector< VectorXi >::value_type const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_front",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_front" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (std::vector< VectorXi >::value_type *) &((std::vector< VectorXi > const *)arg1)->front();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VectorXi, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::value_type *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_back",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_back" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = (std::vector< VectorXi >::value_type *) &((std::vector< VectorXi > const *)arg1)->back();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VectorXi, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::size_type arg2 ;
  std::vector< VectorXi >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  VectorXi temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec_assign",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_assign" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec_assign" "', argument " "2"" of type '" "std::vector< VectorXi >::size_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::size_type >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg3) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->assign(arg2,(std::vector< VectorXi >::value_type const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::size_type arg2 ;
  std::vector< VectorXi >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  VectorXi temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec_resize",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_resize" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec_resize" "', argument " "2"" of type '" "std::vector< VectorXi >::size_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::size_type >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg3) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->resize(arg2,(std::vector< VectorXi >::value_type const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_VectorXiVec_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_VectorXi, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_VectorXiVec_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VectorXiVec_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< VectorXi >::resize(std::vector< VectorXi >::size_type)\n"
    "    std::vector< VectorXi >::resize(std::vector< VectorXi >::size_type,std::vector< VectorXi >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::iterator arg2 ;
  std::vector< VectorXi >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  VectorXi temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< VectorXi >::iterator result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorXiVec_insert",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_insert" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_insert" "', argument " "2"" of type '" "std::vector< VectorXi >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_insert" "', argument " "2"" of type '" "std::vector< VectorXi >::iterator""'");
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg3) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = std_vector_Sl_VectorXi_Sg__insert__SWIG_0(arg1,arg2,(VectorXi const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< VectorXi >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::iterator arg2 ;
  std::vector< VectorXi >::size_type arg3 ;
  std::vector< VectorXi >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  VectorXi temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorXiVec_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_insert" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_insert" "', argument " "2"" of type '" "std::vector< VectorXi >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VectorXiVec_insert" "', argument " "2"" of type '" "std::vector< VectorXi >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorXiVec_insert" "', argument " "3"" of type '" "std::vector< VectorXi >::size_type""'");
  } 
  arg3 = static_cast< std::vector< VectorXi >::size_type >(val3);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg4 = &temp4;
    
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg4) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      std_vector_Sl_VectorXi_Sg__insert__SWIG_1(arg1,arg2,arg3,(VectorXi const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter) != 0));
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_VectorXi, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_VectorXiVec_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< VectorXi,std::allocator< VectorXi > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< VectorXi >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_VectorXi, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_VectorXiVec_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'VectorXiVec_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< VectorXi >::insert(std::vector< VectorXi >::iterator,std::vector< VectorXi >::value_type const &)\n"
    "    std::vector< VectorXi >::insert(std::vector< VectorXi >::iterator,std::vector< VectorXi >::size_type,std::vector< VectorXi >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  std::vector< VectorXi >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:VectorXiVec_reserve",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_reserve" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorXiVec_reserve" "', argument " "2"" of type '" "std::vector< VectorXi >::size_type""'");
  } 
  arg2 = static_cast< std::vector< VectorXi >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VectorXiVec_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< VectorXi >::size_type result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:VectorXiVec_capacity",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorXiVec_capacity" "', argument " "1"" of type '" "std::vector< VectorXi > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      result = ((std::vector< VectorXi > const *)arg1)->capacity();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_VectorXiVec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< VectorXi > *arg1 = (std::vector< VectorXi > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorXiVec",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorXiVec" "', argument " "1"" of type '" "std::vector< VectorXi > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< VectorXi > * >(argp1);
  {
    try {
      delete arg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *VectorXiVec_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *PI_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "PI",SWIG_From_double(static_cast< double >(3.14159265358979323846)));
  return SWIG_Py_Void();
}


SWIGINTERN int Swig_var_L2pi_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable L2pi is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_L2pi_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_double(static_cast< double >(limix::L2pi));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_isnan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::mfloat_t arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:isnan",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "isnan" "', argument " "1"" of type '" "limix::mfloat_t""'");
  } 
  arg1 = static_cast< limix::mfloat_t >(val1);
  {
    try {
      result = (bool)limix::isnan(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_isinf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::mfloat_t arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:isinf",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "isinf" "', argument " "1"" of type '" "limix::mfloat_t""'");
  } 
  arg1 = static_cast< limix::mfloat_t >(val1);
  {
    try {
      result = (bool)limix::isinf(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_exp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::mfloat_t arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:exp",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "exp" "', argument " "1"" of type '" "limix::mfloat_t""'");
  } 
  arg1 = static_cast< limix::mfloat_t >(val1);
  {
    try {
      result = (limix::mfloat_t)limix::exp(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sqrt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::mfloat_t arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:sqrt",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sqrt" "', argument " "1"" of type '" "limix::mfloat_t""'");
  } 
  arg1 = static_cast< limix::mfloat_t >(val1);
  {
    try {
      result = (limix::mfloat_t)limix::sqrt(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::mfloat_t arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:log",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log" "', argument " "1"" of type '" "limix::mfloat_t""'");
  } 
  arg1 = static_cast< limix::mfloat_t >(val1);
  {
    try {
      result = (limix::mfloat_t)limix::log(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_inverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::mfloat_t arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:inverse",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "inverse" "', argument " "1"" of type '" "limix::mfloat_t""'");
  } 
  arg1 = static_cast< limix::mfloat_t >(val1);
  {
    try {
      result = (limix::mfloat_t)limix::inverse(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLimixException__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::string arg1 ;
  PyObject * obj0 = 0 ;
  limix::CLimixException *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CLimixException",&obj0)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string(obj0, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_CLimixException" "', argument " "1"" of type '" "std::string""'"); 
    }
    arg1 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      result = (limix::CLimixException *)new limix::CLimixException(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_limix__CLimixException, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLimixException__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLimixException *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CLimixException")) SWIG_fail;
  {
    try {
      result = (limix::CLimixException *)new limix::CLimixException();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_limix__CLimixException, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLimixException(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CLimixException__SWIG_1(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CLimixException__SWIG_0(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CLimixException'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CLimixException::CLimixException(std::string)\n"
    "    limix::CLimixException::CLimixException()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CLimixException(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLimixException *arg1 = (limix::CLimixException *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CLimixException",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__CLimixException, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLimixException" "', argument " "1"" of type '" "limix::CLimixException *""'"); 
  }
  arg1 = reinterpret_cast< limix::CLimixException * >(argp1);
  {
    try {
      delete arg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLimixException_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLimixException *arg1 = (limix::CLimixException *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLimixException_what",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__CLimixException, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLimixException_what" "', argument " "1"" of type '" "limix::CLimixException *""'"); 
  }
  arg1 = reinterpret_cast< limix::CLimixException * >(argp1);
  {
    try {
      result = (arg1)->what();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CLimixException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_limix__CLimixException, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CParamObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CParamObject")) SWIG_fail;
  {
    try {
      result = (limix::CParamObject *)new limix::CParamObject();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CParamObject > *smartresult = result ? new std::shared_ptr<  limix::CParamObject >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_addSyncParent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  SwigValueWrapper< std::shared_ptr< bool > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CParamObject_addSyncParent",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_addSyncParent" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_bool_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CParamObject_addSyncParent" "', argument " "2"" of type '" "limix::Pbool""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CParamObject_addSyncParent" "', argument " "2"" of type '" "limix::Pbool""'");
    } else {
      limix::Pbool * temp = reinterpret_cast< limix::Pbool * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->addSyncParent(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_addSyncChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  SwigValueWrapper< std::shared_ptr< bool > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CParamObject_addSyncChild",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_addSyncChild" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_bool_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CParamObject_addSyncChild" "', argument " "2"" of type '" "limix::Pbool""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CParamObject_addSyncChild" "', argument " "2"" of type '" "limix::Pbool""'");
    } else {
      limix::Pbool * temp = reinterpret_cast< limix::Pbool * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->addSyncChild(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_delSyncParent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  SwigValueWrapper< std::shared_ptr< bool > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CParamObject_delSyncParent",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_delSyncParent" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_bool_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CParamObject_delSyncParent" "', argument " "2"" of type '" "limix::Pbool""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CParamObject_delSyncParent" "', argument " "2"" of type '" "limix::Pbool""'");
    } else {
      limix::Pbool * temp = reinterpret_cast< limix::Pbool * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->delSyncParent(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_delSyncChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  SwigValueWrapper< std::shared_ptr< bool > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CParamObject_delSyncChild",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_delSyncChild" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_bool_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CParamObject_delSyncChild" "', argument " "2"" of type '" "limix::Pbool""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CParamObject_delSyncChild" "', argument " "2"" of type '" "limix::Pbool""'");
    } else {
      limix::Pbool * temp = reinterpret_cast< limix::Pbool * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->delSyncChild(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_propagateSync__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CParamObject_propagateSync",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_propagateSync" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CParamObject_propagateSync" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->propagateSync(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_propagateSync__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CParamObject_propagateSync",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_propagateSync" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->propagateSync();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_propagateSync(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CParamObject_propagateSync__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_CParamObject_propagateSync__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CParamObject_propagateSync'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CParamObject::propagateSync(bool)\n"
    "    limix::CParamObject::propagateSync()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CParamObject_isInSync(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CParamObject_isInSync",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_isInSync" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)(arg1)->isInSync();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_setSync__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CParamObject_setSync",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_setSync" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CParamObject_setSync" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->setSync(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_setSync__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CParamObject_setSync",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CParamObject_setSync" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->setSync();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CParamObject_setSync(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CParamObject_setSync__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_CParamObject_setSync__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CParamObject_setSync'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CParamObject::setSync(bool)\n"
    "    limix::CParamObject::setSync()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CParamObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CParamObject *arg1 = (limix::CParamObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CParamObject > tempshared1 ;
  std::shared_ptr< limix::CParamObject > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CParamObject",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CParamObject" "', argument " "1"" of type '" "limix::CParamObject *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CParamObject > * >(argp1);
      arg1 = const_cast< limix::CParamObject * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CParamObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CParamObject_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CNamedCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CNamedCache *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CNamedCache")) SWIG_fail;
  {
    try {
      result = (limix::CNamedCache *)new limix::CNamedCache();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CNamedCache > *smartresult = result ? new std::shared_ptr<  limix::CNamedCache >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CNamedCache_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CNamedCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CNamedCache *arg1 = (limix::CNamedCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CNamedCache > tempshared1 ;
  std::shared_ptr< limix::CNamedCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CNamedCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CNamedCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CNamedCache" "', argument " "1"" of type '" "limix::CNamedCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      arg1 = const_cast< limix::CNamedCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      arg1 = const_cast< limix::CNamedCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CNamedCache_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CNamedCache *arg1 = (limix::CNamedCache *) 0 ;
  std::string arg2 ;
  PCVoid arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CNamedCache > tempshared1 ;
  std::shared_ptr< limix::CNamedCache > *smartarg1 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CNamedCache_set",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CNamedCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CNamedCache_set" "', argument " "1"" of type '" "limix::CNamedCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      arg1 = const_cast< limix::CNamedCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      arg1 = const_cast< limix::CNamedCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "CNamedCache_set" "', argument " "2"" of type '" "std::string""'"); 
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_PCVoid,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CNamedCache_set" "', argument " "3"" of type '" "PCVoid""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CNamedCache_set" "', argument " "3"" of type '" "PCVoid""'");
    } else {
      PCVoid * temp = reinterpret_cast< PCVoid * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    try {
      (arg1)->set(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CNamedCache_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CNamedCache *arg1 = (limix::CNamedCache *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CNamedCache > tempshared1 ;
  std::shared_ptr< limix::CNamedCache > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PCVoid result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CNamedCache_get",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CNamedCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CNamedCache_get" "', argument " "1"" of type '" "limix::CNamedCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      arg1 = const_cast< limix::CNamedCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CNamedCache > * >(argp1);
      arg1 = const_cast< limix::CNamedCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CNamedCache_get" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CNamedCache_get" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (arg1)->get((std::string const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new PCVoid(static_cast< const PCVoid& >(result))), SWIGTYPE_p_PCVoid, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *CNamedCache_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CNamedCache_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_ACovarianceFunction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_ACovarianceFunction",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ACovarianceFunction" "', argument " "1"" of type '" "limix::ACovarianceFunction *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getName" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::ACovarianceFunction const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_setParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_setParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_setParams" "', argument " "1"" of type '" "limix::ACovarianceFunction *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParams((limix::CovarParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getParams" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->agetParams(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getParamBounds0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  limix::CovarParams *arg3 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getParamBounds0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getParamBounds0" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->agetParamBounds0(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg3->rows(), arg3->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg3->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getParamBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  limix::CovarParams *arg3 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getParamBounds",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getParamBounds" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->agetParamBounds(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg3->rows(), arg3->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg3->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_setParamBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarParams *arg2 = 0 ;
  limix::CovarParams *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction > *smartarg1 = 0 ;
  VectorXd temp2 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:ACovarianceFunction_setParamBounds",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_setParamBounds" "', argument " "1"" of type '" "limix::ACovarianceFunction *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParamBounds((limix::CovarParams const &)*arg2,(limix::CovarParams const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getParamMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getParamMask",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getParamMask" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->agetParamMask(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_setParamMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_setParamMask",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_setParamMask" "', argument " "1"" of type '" "limix::ACovarianceFunction *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParamMask((limix::CovarParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_setX" "', argument " "1"" of type '" "limix::ACovarianceFunction *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:ACovarianceFunction_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_setXcol" "', argument " "1"" of type '" "limix::ACovarianceFunction *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::CovarInput *arg2 = (limix::CovarInput *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getX",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getX" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->agetX(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getDimX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getDimX",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getDimX" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::ACovarianceFunction const *)arg1)->getDimX();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getNumberParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getNumberParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getNumberParams" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::ACovarianceFunction const *)arg1)->getNumberParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_getNumberDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_getNumberDimensions",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_getNumberDimensions" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::ACovarianceFunction const *)arg1)->getNumberDimensions();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_setNumberDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_setNumberDimensions",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_setNumberDimensions" "', argument " "1"" of type '" "limix::ACovarianceFunction *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ACovarianceFunction_setNumberDimensions" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      (arg1)->setNumberDimensions(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Kdim" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::ACovarianceFunction const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_K" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Kdiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_Kdiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Kdiag" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aKdiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Kgrad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_Kgrad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Kgrad_X" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_Kgrad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aKgrad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Kcross" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Kcross_diag" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Kgrad_param" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:ACovarianceFunction_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Khess_param" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ACovarianceFunction_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:ACovarianceFunction_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Kcross_grad_X" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ACovarianceFunction_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = (limix::ACovarianceFunction *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction const > tempshared1 ;
  std::shared_ptr< limix::ACovarianceFunction const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Kdiag_grad_X" "', argument " "1"" of type '" "limix::ACovarianceFunction const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::ACovarianceFunction const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_theta__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = 0 ;
  limix::mfloat_t arg2 ;
  limix::mfloat_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:ACovarianceFunction_check_covariance_Kgrad_theta",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::ACovarianceFunction * >(reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1)->get());
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "3"" of type '" "limix::mfloat_t""'");
  } 
  arg3 = static_cast< limix::mfloat_t >(val3);
  {
    try {
      result = (bool)limix::ACovarianceFunction::check_covariance_Kgrad_theta(*arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_theta__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_check_covariance_Kgrad_theta",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::ACovarianceFunction * >(reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1)->get());
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      result = (bool)limix::ACovarianceFunction::check_covariance_Kgrad_theta(*arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_theta__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_check_covariance_Kgrad_theta",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ACovarianceFunction_check_covariance_Kgrad_theta" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::ACovarianceFunction * >(reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1)->get());
    }
  }
  {
    try {
      result = (bool)limix::ACovarianceFunction::check_covariance_Kgrad_theta(*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_theta(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_ACovarianceFunction_check_covariance_Kgrad_theta__SWIG_2(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ACovarianceFunction_check_covariance_Kgrad_theta__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_ACovarianceFunction_check_covariance_Kgrad_theta__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ACovarianceFunction_check_covariance_Kgrad_theta'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::ACovarianceFunction::check_covariance_Kgrad_theta(limix::ACovarianceFunction &,limix::mfloat_t,limix::mfloat_t)\n"
    "    limix::ACovarianceFunction::check_covariance_Kgrad_theta(limix::ACovarianceFunction &,limix::mfloat_t)\n"
    "    limix::ACovarianceFunction::check_covariance_Kgrad_theta(limix::ACovarianceFunction &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = 0 ;
  limix::mfloat_t arg2 ;
  limix::mfloat_t arg3 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:ACovarianceFunction_check_covariance_Kgrad_x",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::ACovarianceFunction * >(reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1)->get());
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "3"" of type '" "limix::mfloat_t""'");
  } 
  arg3 = static_cast< limix::mfloat_t >(val3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (bool)limix::ACovarianceFunction::check_covariance_Kgrad_x(*arg1,arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = 0 ;
  limix::mfloat_t arg2 ;
  limix::mfloat_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:ACovarianceFunction_check_covariance_Kgrad_x",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::ACovarianceFunction * >(reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1)->get());
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "3"" of type '" "limix::mfloat_t""'");
  } 
  arg3 = static_cast< limix::mfloat_t >(val3);
  {
    try {
      result = (bool)limix::ACovarianceFunction::check_covariance_Kgrad_x(*arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_x__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ACovarianceFunction_check_covariance_Kgrad_x",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::ACovarianceFunction * >(reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1)->get());
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      result = (bool)limix::ACovarianceFunction::check_covariance_Kgrad_x(*arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_x__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ACovarianceFunction_check_covariance_Kgrad_x",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ACovarianceFunction_check_covariance_Kgrad_x" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::ACovarianceFunction * >(reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1)->get());
    }
  }
  {
    try {
      result = (bool)limix::ACovarianceFunction::check_covariance_Kgrad_x(*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_check_covariance_Kgrad_x(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_ACovarianceFunction_check_covariance_Kgrad_x__SWIG_3(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ACovarianceFunction_check_covariance_Kgrad_x__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_ACovarianceFunction_check_covariance_Kgrad_x__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0;
          }
          if (_v) {
            return _wrap_ACovarianceFunction_check_covariance_Kgrad_x__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ACovarianceFunction_check_covariance_Kgrad_x'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::ACovarianceFunction::check_covariance_Kgrad_x(limix::ACovarianceFunction &,limix::mfloat_t,limix::mfloat_t,bool)\n"
    "    limix::ACovarianceFunction::check_covariance_Kgrad_x(limix::ACovarianceFunction &,limix::mfloat_t,limix::mfloat_t)\n"
    "    limix::ACovarianceFunction::check_covariance_Kgrad_x(limix::ACovarianceFunction &,limix::mfloat_t)\n"
    "    limix::ACovarianceFunction::check_covariance_Kgrad_x(limix::ACovarianceFunction &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ACovarianceFunction_Khess_param_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarianceFunction *arg1 = 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ACovarianceFunction > tempshared1 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:ACovarianceFunction_Khess_param_num",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ACovarianceFunction_Khess_param_num" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ACovarianceFunction_Khess_param_num" "', argument " "1"" of type '" "limix::ACovarianceFunction &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1);
      arg1 = const_cast< limix::ACovarianceFunction * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::ACovarianceFunction * >(reinterpret_cast< std::shared_ptr<  limix::ACovarianceFunction > * >(argp1)->get());
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ACovarianceFunction_Khess_param_num" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ACovarianceFunction_Khess_param_num" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      limix::ACovarianceFunction::aKhess_param_num(*arg1,arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ACovarianceFunction_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CCovarianceFunctionCacheOld__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CCovarianceFunctionCacheOld")) SWIG_fail;
  {
    try {
      result = (limix::CCovarianceFunctionCacheOld *)new limix::CCovarianceFunctionCacheOld();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CCovarianceFunctionCacheOld__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  void *argp1 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CCovarianceFunctionCacheOld",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CCovarianceFunctionCacheOld" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    try {
      result = (limix::CCovarianceFunctionCacheOld *)new limix::CCovarianceFunctionCacheOld(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CCovarianceFunctionCacheOld(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CCovarianceFunctionCacheOld__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CCovarianceFunctionCacheOld__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CCovarianceFunctionCacheOld'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CCovarianceFunctionCacheOld::CCovarianceFunctionCacheOld()\n"
    "    limix::CCovarianceFunctionCacheOld::CCovarianceFunctionCacheOld(limix::PCovarianceFunction)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CCovarianceFunctionCacheOld(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CCovarianceFunctionCacheOld",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CCovarianceFunctionCacheOld" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovarianceFunctionCacheOld_setCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovarianceFunctionCacheOld_setCovar",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovarianceFunctionCacheOld_setCovar" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CCovarianceFunctionCacheOld_setCovar" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setCovar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovarianceFunctionCacheOld_addSyncChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  SwigValueWrapper< std::shared_ptr< bool > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovarianceFunctionCacheOld_addSyncChild",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovarianceFunctionCacheOld_addSyncChild" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_bool_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CCovarianceFunctionCacheOld_addSyncChild" "', argument " "2"" of type '" "limix::Pbool""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CCovarianceFunctionCacheOld_addSyncChild" "', argument " "2"" of type '" "limix::Pbool""'");
    } else {
      limix::Pbool * temp = reinterpret_cast< limix::Pbool * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->addSyncChild(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovarianceFunctionCacheOld_delSyncChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  SwigValueWrapper< std::shared_ptr< bool > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovarianceFunctionCacheOld_delSyncChild",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovarianceFunctionCacheOld_delSyncChild" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_bool_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CCovarianceFunctionCacheOld_delSyncChild" "', argument " "2"" of type '" "limix::Pbool""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CCovarianceFunctionCacheOld_delSyncChild" "', argument " "2"" of type '" "limix::Pbool""'");
    } else {
      limix::Pbool * temp = reinterpret_cast< limix::Pbool * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->delSyncChild(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovarianceFunctionCacheOld_getCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovarianceFunctionCacheOld_getCovar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovarianceFunctionCacheOld_getCovar" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovarianceFunctionCacheOld_rgetK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovarianceFunctionCacheOld_rgetK",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovarianceFunctionCacheOld_rgetK" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetK();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovarianceFunctionCacheOld_rgetUK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovarianceFunctionCacheOld_rgetUK",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovarianceFunctionCacheOld_rgetUK" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetUK();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovarianceFunctionCacheOld_rgetSK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  VectorXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovarianceFunctionCacheOld_rgetSK",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovarianceFunctionCacheOld_rgetSK" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (VectorXd *) &(arg1)->rgetSK();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VectorXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovarianceFunctionCacheOld_rgetCholK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovarianceFunctionCacheOld *arg1 = (limix::CCovarianceFunctionCacheOld *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > tempshared1 ;
  std::shared_ptr< limix::CCovarianceFunctionCacheOld > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXdChol *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovarianceFunctionCacheOld_rgetCholK",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovarianceFunctionCacheOld_rgetCholK" "', argument " "1"" of type '" "limix::CCovarianceFunctionCacheOld *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovarianceFunctionCacheOld > * >(argp1);
      arg1 = const_cast< limix::CCovarianceFunctionCacheOld * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXdChol *) &(arg1)->rgetCholK();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXdChol, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CCovarianceFunctionCacheOld_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CCovLinearISO__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CCovLinearISO *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CCovLinearISO",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CCovLinearISO" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CCovLinearISO *)new limix::CCovLinearISO(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovLinearISO > *smartresult = result ? new std::shared_ptr<  limix::CCovLinearISO >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CCovLinearISO__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CCovLinearISO")) SWIG_fail;
  {
    try {
      result = (limix::CCovLinearISO *)new limix::CCovLinearISO();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovLinearISO > *smartresult = result ? new std::shared_ptr<  limix::CCovLinearISO >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CCovLinearISO(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CCovLinearISO__SWIG_1(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      return _wrap_new_CCovLinearISO__SWIG_0(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CCovLinearISO'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CCovLinearISO::CCovLinearISO(limix::muint_t)\n"
    "    limix::CCovLinearISO::CCovLinearISO()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CCovLinearISO(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *arg1 = (limix::CCovLinearISO *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISO > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISO > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CCovLinearISO",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CCovLinearISO" "', argument " "1"" of type '" "limix::CCovLinearISO *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovLinearISO > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISO_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *arg1 = (limix::CCovLinearISO *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISO const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISO const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearISO_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISO_Kcross" "', argument " "1"" of type '" "limix::CCovLinearISO const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CCovLinearISO const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISO_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *arg1 = (limix::CCovLinearISO *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISO const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISO const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearISO_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISO_Kcross_diag" "', argument " "1"" of type '" "limix::CCovLinearISO const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CCovLinearISO const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISO_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *arg1 = (limix::CCovLinearISO *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISO const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISO const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearISO_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISO_Kgrad_param" "', argument " "1"" of type '" "limix::CCovLinearISO const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovLinearISO_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CCovLinearISO const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISO_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *arg1 = (limix::CCovLinearISO *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISO const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISO const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CCovLinearISO_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISO_Khess_param" "', argument " "1"" of type '" "limix::CCovLinearISO const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovLinearISO_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CCovLinearISO_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CCovLinearISO const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISO_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *arg1 = (limix::CCovLinearISO *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISO const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISO const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CCovLinearISO_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISO_Kcross_grad_X" "', argument " "1"" of type '" "limix::CCovLinearISO const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CCovLinearISO_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CCovLinearISO const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISO_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *arg1 = (limix::CCovLinearISO *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISO const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISO const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearISO_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISO_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CCovLinearISO const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovLinearISO_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CCovLinearISO const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISO_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISO *arg1 = (limix::CCovLinearISO *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISO const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISO const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovLinearISO_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISO_getName" "', argument " "1"" of type '" "limix::CCovLinearISO const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISO > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISO * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CCovLinearISO const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CCovLinearISO_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISO_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CCovLinearARD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CCovLinearARD *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CCovLinearARD",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CCovLinearARD" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CCovLinearARD *)new limix::CCovLinearARD(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovLinearARD > *smartresult = result ? new std::shared_ptr<  limix::CCovLinearARD >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CCovLinearARD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CCovLinearARD")) SWIG_fail;
  {
    try {
      result = (limix::CCovLinearARD *)new limix::CCovLinearARD();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovLinearARD > *smartresult = result ? new std::shared_ptr<  limix::CCovLinearARD >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CCovLinearARD(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CCovLinearARD__SWIG_1(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      return _wrap_new_CCovLinearARD__SWIG_0(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CCovLinearARD'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CCovLinearARD::CCovLinearARD(limix::muint_t)\n"
    "    limix::CCovLinearARD::CCovLinearARD()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CCovLinearARD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CCovLinearARD",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CCovLinearARD" "', argument " "1"" of type '" "limix::CCovLinearARD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearARD_setNumberDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearARD_setNumberDimensions",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearARD_setNumberDimensions" "', argument " "1"" of type '" "limix::CCovLinearARD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CCovLinearARD_setNumberDimensions" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      (arg1)->setNumberDimensions(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearARD_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearARD_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearARD_Kcross" "', argument " "1"" of type '" "limix::CCovLinearARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CCovLinearARD const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearARD_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearARD_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearARD_Kcross_diag" "', argument " "1"" of type '" "limix::CCovLinearARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CCovLinearARD const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearARD_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearARD_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearARD_Kgrad_param" "', argument " "1"" of type '" "limix::CCovLinearARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovLinearARD_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CCovLinearARD const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearARD_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CCovLinearARD_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearARD_Khess_param" "', argument " "1"" of type '" "limix::CCovLinearARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovLinearARD_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CCovLinearARD_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CCovLinearARD const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearARD_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CCovLinearARD_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearARD_Kcross_grad_X" "', argument " "1"" of type '" "limix::CCovLinearARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CCovLinearARD_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CCovLinearARD const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearARD_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearARD_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearARD_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CCovLinearARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovLinearARD_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CCovLinearARD const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearARD_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearARD *arg1 = (limix::CCovLinearARD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearARD const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearARD const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovLinearARD_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearARD_getName" "', argument " "1"" of type '" "limix::CCovLinearARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearARD > * >(argp1);
      arg1 = const_cast< limix::CCovLinearARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CCovLinearARD const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CCovLinearARD_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearARD_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_CCovLinearISODelta(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISODelta *arg1 = (limix::CCovLinearISODelta *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISODelta > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISODelta > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CCovLinearISODelta",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISODelta_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CCovLinearISODelta" "', argument " "1"" of type '" "limix::CCovLinearISODelta *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovLinearISODelta > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISODelta_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISODelta *arg1 = (limix::CCovLinearISODelta *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISODelta const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISODelta const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearISODelta_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISODelta_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISODelta_Kcross" "', argument " "1"" of type '" "limix::CCovLinearISODelta const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CCovLinearISODelta const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISODelta_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISODelta *arg1 = (limix::CCovLinearISODelta *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISODelta const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISODelta const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearISODelta_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISODelta_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISODelta_Kcross_diag" "', argument " "1"" of type '" "limix::CCovLinearISODelta const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CCovLinearISODelta const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISODelta_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISODelta *arg1 = (limix::CCovLinearISODelta *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISODelta const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISODelta const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovLinearISODelta_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISODelta_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISODelta_Kgrad_param" "', argument " "1"" of type '" "limix::CCovLinearISODelta const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovLinearISODelta_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CCovLinearISODelta const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISODelta_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISODelta *arg1 = (limix::CCovLinearISODelta *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISODelta const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISODelta const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CCovLinearISODelta_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISODelta_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISODelta_Khess_param" "', argument " "1"" of type '" "limix::CCovLinearISODelta const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovLinearISODelta_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CCovLinearISODelta_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CCovLinearISODelta const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovLinearISODelta_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovLinearISODelta *arg1 = (limix::CCovLinearISODelta *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovLinearISODelta const > tempshared1 ;
  std::shared_ptr< limix::CCovLinearISODelta const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovLinearISODelta_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISODelta_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovLinearISODelta_getName" "', argument " "1"" of type '" "limix::CCovLinearISODelta const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovLinearISODelta > * >(argp1);
      arg1 = const_cast< limix::CCovLinearISODelta * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CCovLinearISODelta const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CCovLinearISODelta_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CCovLinearISODelta_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CFreeFormCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CFreeFormCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CFreeFormCF",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CFreeFormCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CFreeFormCF *)new limix::CFreeFormCF(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CFreeFormCF > *smartresult = result ? new std::shared_ptr<  limix::CFreeFormCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CFreeFormCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CFreeFormCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CFreeFormCF" "', argument " "1"" of type '" "limix::CFreeFormCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFreeFormCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_setX" "', argument " "1"" of type '" "limix::CFreeFormCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CFreeFormCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_setXcol" "', argument " "1"" of type '" "limix::CFreeFormCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFreeFormCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFreeFormCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_Kcross_diag" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CFreeFormCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CFreeFormCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFreeFormCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFreeFormCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CFreeFormCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_Kdim" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CFreeFormCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFreeFormCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_agetScales" "', argument " "1"" of type '" "limix::CFreeFormCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFreeFormCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CFreeFormCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFreeFormCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_Kcross" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFreeFormCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_Kgrad_param" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFreeFormCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CFreeFormCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_Khess_param" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFreeFormCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CFreeFormCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFreeFormCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_agetParamMask0" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CFreeFormCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_getName" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CFreeFormCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_setParamsVarCorr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  limix::CovarParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFreeFormCF_setParamsVarCorr",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_setParamsVarCorr" "', argument " "1"" of type '" "limix::CFreeFormCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParamsVarCorr((limix::CovarParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_agetL0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFreeFormCF_agetL0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_agetL0" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->agetL0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_agetL0grad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFreeFormCF_agetL0grad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_agetL0grad_param" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFreeFormCF_agetL0grad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->agetL0grad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFreeFormCF_getIparamDiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFreeFormCF *arg1 = (limix::CFreeFormCF *) 0 ;
  VectorXi *arg2 = (VectorXi *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFreeFormCF const > tempshared1 ;
  std::shared_ptr< limix::CFreeFormCF const > *smartarg1 = 0 ;
  VectorXi temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFreeFormCF_getIparamDiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFreeFormCF_getIparamDiag" "', argument " "1"" of type '" "limix::CFreeFormCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFreeFormCF > * >(argp1);
      arg1 = const_cast< limix::CFreeFormCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFreeFormCF const *)arg1)->agetIparamDiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_INT64);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mint_t* out_data = (mint_t*)array_data(out_array);
    Eigen::Map<VectorXiscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CFreeFormCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CFreeFormCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CRankOneCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CRankOneCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CRankOneCF",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CRankOneCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CRankOneCF *)new limix::CRankOneCF(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CRankOneCF > *smartresult = result ? new std::shared_ptr<  limix::CRankOneCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CRankOneCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CRankOneCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRankOneCF" "', argument " "1"" of type '" "limix::CRankOneCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CRankOneCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_setX" "', argument " "1"" of type '" "limix::CRankOneCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CRankOneCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_setXcol" "', argument " "1"" of type '" "limix::CRankOneCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CRankOneCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CRankOneCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_Kcross_diag" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CRankOneCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CRankOneCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CRankOneCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CRankOneCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CRankOneCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CRankOneCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CRankOneCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CRankOneCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_Kdim" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CRankOneCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CRankOneCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_agetScales" "', argument " "1"" of type '" "limix::CRankOneCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CRankOneCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CRankOneCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CRankOneCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_Kcross" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CRankOneCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CRankOneCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_Kgrad_param" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CRankOneCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CRankOneCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CRankOneCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_Khess_param" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CRankOneCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CRankOneCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CRankOneCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CRankOneCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_agetParamMask0" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CRankOneCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRankOneCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRankOneCF *arg1 = (limix::CRankOneCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRankOneCF const > tempshared1 ;
  std::shared_ptr< limix::CRankOneCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CRankOneCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRankOneCF_getName" "', argument " "1"" of type '" "limix::CRankOneCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRankOneCF > * >(argp1);
      arg1 = const_cast< limix::CRankOneCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CRankOneCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CRankOneCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CRankOneCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CLowRankCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  limix::muint_t arg2 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CLowRankCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_CLowRankCF",&obj0,&obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CLowRankCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CLowRankCF" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      result = (limix::CLowRankCF *)new limix::CLowRankCF(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLowRankCF > *smartresult = result ? new std::shared_ptr<  limix::CLowRankCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CLowRankCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CLowRankCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLowRankCF" "', argument " "1"" of type '" "limix::CLowRankCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLowRankCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_setX" "', argument " "1"" of type '" "limix::CLowRankCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CLowRankCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_setXcol" "', argument " "1"" of type '" "limix::CLowRankCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLowRankCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLowRankCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_Kcross_diag" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CLowRankCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CLowRankCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CLowRankCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CLowRankCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLowRankCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLowRankCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CLowRankCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLowRankCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_Kdim" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CLowRankCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLowRankCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_agetScales" "', argument " "1"" of type '" "limix::CLowRankCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLowRankCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CLowRankCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLowRankCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_Kcross" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CLowRankCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLowRankCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_Kgrad_param" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLowRankCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CLowRankCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CLowRankCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_Khess_param" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLowRankCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CLowRankCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CLowRankCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLowRankCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_agetParamMask0" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLowRankCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLowRankCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLowRankCF *arg1 = (limix::CLowRankCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLowRankCF const > tempshared1 ;
  std::shared_ptr< limix::CLowRankCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLowRankCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLowRankCF_getName" "', argument " "1"" of type '" "limix::CLowRankCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLowRankCF > * >(argp1);
      arg1 = const_cast< limix::CLowRankCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CLowRankCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CLowRankCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CLowRankCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CFixedCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd temp1 ;
  PyObject * obj0 = 0 ;
  limix::CFixedCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CFixedCF",&obj0)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (limix::CFixedCF *)new limix::CFixedCF((MatrixXd const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CFixedCF > *smartresult = result ? new std::shared_ptr<  limix::CFixedCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CFixedCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF > tempshared1 ;
  std::shared_ptr< limix::CFixedCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CFixedCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CFixedCF" "', argument " "1"" of type '" "limix::CFixedCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF > tempshared1 ;
  std::shared_ptr< limix::CFixedCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_agetScales" "', argument " "1"" of type '" "limix::CFixedCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF > tempshared1 ;
  std::shared_ptr< limix::CFixedCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CFixedCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_Kcross" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CFixedCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_Kcross_diag" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CFixedCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_Kgrad_param" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFixedCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CFixedCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CFixedCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_Khess_param" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFixedCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CFixedCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CFixedCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CFixedCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CFixedCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CFixedCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFixedCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CFixedCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedCF_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_K" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFixedCF const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_Kdim" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CFixedCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_agetParamMask0" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFixedCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_setK0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF > tempshared1 ;
  std::shared_ptr< limix::CFixedCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedCF_setK0",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_setK0" "', argument " "1"" of type '" "limix::CFixedCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK0((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_setK0cross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF > tempshared1 ;
  std::shared_ptr< limix::CFixedCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedCF_setK0cross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_setK0cross" "', argument " "1"" of type '" "limix::CFixedCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK0cross((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_agetK0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedCF_agetK0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_agetK0" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFixedCF const *)arg1)->agetK0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_agetK0cross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedCF_agetK0cross",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_agetK0cross" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFixedCF const *)arg1)->agetK0cross(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_setK0cross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF > tempshared1 ;
  std::shared_ptr< limix::CFixedCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedCF_setK0cross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_setK0cross_diag" "', argument " "1"" of type '" "limix::CFixedCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setK0cross_diag((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_agetK0cross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedCF_agetK0cross_diag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_agetK0cross_diag" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFixedCF const *)arg1)->agetK0cross_diag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedCF *arg1 = (limix::CFixedCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedCF_getName" "', argument " "1"" of type '" "limix::CFixedCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedCF > * >(argp1);
      arg1 = const_cast< limix::CFixedCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CFixedCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CFixedCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CDiagonalCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CDiagonalCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CDiagonalCF",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CDiagonalCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CDiagonalCF *)new limix::CDiagonalCF(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CDiagonalCF > *smartresult = result ? new std::shared_ptr<  limix::CDiagonalCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CDiagonalCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CDiagonalCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CDiagonalCF" "', argument " "1"" of type '" "limix::CDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CDiagonalCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_setX" "', argument " "1"" of type '" "limix::CDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CDiagonalCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_setXcol" "', argument " "1"" of type '" "limix::CDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CDiagonalCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CDiagonalCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_Kcross_diag" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CDiagonalCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CDiagonalCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CDiagonalCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CDiagonalCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CDiagonalCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CDiagonalCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CDiagonalCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CDiagonalCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_agetScales" "', argument " "1"" of type '" "limix::CDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CDiagonalCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CDiagonalCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_Kdim" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CDiagonalCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CDiagonalCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_Kcross" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CDiagonalCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CDiagonalCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_Kgrad_param" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CDiagonalCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CDiagonalCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CDiagonalCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_Khess_param" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CDiagonalCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CDiagonalCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CDiagonalCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CDiagonalCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_agetParamMask0" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CDiagonalCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CDiagonalCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CDiagonalCF *arg1 = (limix::CDiagonalCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CDiagonalCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CDiagonalCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CDiagonalCF_getName" "', argument " "1"" of type '" "limix::CDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CDiagonalCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CDiagonalCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CDiagonalCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CRank1diagCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CRank1diagCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CRank1diagCF",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CRank1diagCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CRank1diagCF *)new limix::CRank1diagCF(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CRank1diagCF > *smartresult = result ? new std::shared_ptr<  limix::CRank1diagCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CRank1diagCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CRank1diagCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRank1diagCF" "', argument " "1"" of type '" "limix::CRank1diagCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CRank1diagCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_setX" "', argument " "1"" of type '" "limix::CRank1diagCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CRank1diagCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_setXcol" "', argument " "1"" of type '" "limix::CRank1diagCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CRank1diagCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CRank1diagCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_Kcross_diag" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CRank1diagCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CRank1diagCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CRank1diagCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CRank1diagCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CRank1diagCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_agetScales" "', argument " "1"" of type '" "limix::CRank1diagCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CRank1diagCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CRank1diagCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CRank1diagCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_Kdim" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CRank1diagCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_agetRank1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CRank1diagCF_agetRank1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_agetRank1" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->agetRank1(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_agetDiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CRank1diagCF_agetDiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_agetDiag" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->agetDiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CRank1diagCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_Kcross" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CRank1diagCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_Kgrad_param" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CRank1diagCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CRank1diagCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_Khess_param" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CRank1diagCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CRank1diagCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CRank1diagCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_agetParamMask0" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CRank1diagCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRank1diagCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRank1diagCF *arg1 = (limix::CRank1diagCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRank1diagCF const > tempshared1 ;
  std::shared_ptr< limix::CRank1diagCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CRank1diagCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRank1diagCF_getName" "', argument " "1"" of type '" "limix::CRank1diagCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRank1diagCF > * >(argp1);
      arg1 = const_cast< limix::CRank1diagCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CRank1diagCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CRank1diagCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CRank1diagCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CSqExpCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  limix::muint_t arg2 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CSqExpCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_CSqExpCF",&obj0,&obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CSqExpCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CSqExpCF" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      result = (limix::CSqExpCF *)new limix::CSqExpCF(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CSqExpCF > *smartresult = result ? new std::shared_ptr<  limix::CSqExpCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CSqExpCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CSqExpCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CSqExpCF" "', argument " "1"" of type '" "limix::CSqExpCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CSqExpCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_setX" "', argument " "1"" of type '" "limix::CSqExpCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CSqExpCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_setXcol" "', argument " "1"" of type '" "limix::CSqExpCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CSqExpCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSqExpCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_Kcross_diag" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CSqExpCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CSqExpCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CSqExpCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CSqExpCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSqExpCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CSqExpCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CSqExpCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CSqExpCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_agetScales" "', argument " "1"" of type '" "limix::CSqExpCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CSqExpCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CSqExpCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSqExpCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_Kdim" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CSqExpCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSqExpCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_Kcross" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CSqExpCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSqExpCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_Kgrad_param" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CSqExpCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CSqExpCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CSqExpCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_Khess_param" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CSqExpCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CSqExpCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CSqExpCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CSqExpCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_agetParamMask0" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CSqExpCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSqExpCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSqExpCF *arg1 = (limix::CSqExpCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSqExpCF const > tempshared1 ;
  std::shared_ptr< limix::CSqExpCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSqExpCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSqExpCF_getName" "', argument " "1"" of type '" "limix::CSqExpCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSqExpCF > * >(argp1);
      arg1 = const_cast< limix::CSqExpCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CSqExpCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CSqExpCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CSqExpCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CFixedDiagonalCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  VectorXd *arg2 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CFixedDiagonalCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_CFixedDiagonalCF",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CFixedDiagonalCF" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      result = (limix::CFixedDiagonalCF *)new limix::CFixedDiagonalCF(arg1,(VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CFixedDiagonalCF > *smartresult = result ? new std::shared_ptr<  limix::CFixedDiagonalCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CFixedDiagonalCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CFixedDiagonalCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CFixedDiagonalCF" "', argument " "1"" of type '" "limix::CFixedDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_setParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  limix::CovarParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedDiagonalCF_setParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_setParams" "', argument " "1"" of type '" "limix::CFixedDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParams((limix::CovarParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_getParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedDiagonalCF_getParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_getParams" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFixedDiagonalCF const *)arg1)->agetParams(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedDiagonalCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_setX" "', argument " "1"" of type '" "limix::CFixedDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CFixedDiagonalCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_setXcol" "', argument " "1"" of type '" "limix::CFixedDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFixedDiagonalCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedDiagonalCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_Kcross_diag" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CFixedDiagonalCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CFixedDiagonalCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CFixedDiagonalCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CFixedDiagonalCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedDiagonalCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFixedDiagonalCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CFixedDiagonalCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedDiagonalCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_agetScales" "', argument " "1"" of type '" "limix::CFixedDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedDiagonalCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CFixedDiagonalCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedDiagonalCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_Kdim" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CFixedDiagonalCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedDiagonalCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_Kcross" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CFixedDiagonalCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CFixedDiagonalCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_Kgrad_param" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFixedDiagonalCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CFixedDiagonalCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CFixedDiagonalCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_Khess_param" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CFixedDiagonalCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CFixedDiagonalCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CFixedDiagonalCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedDiagonalCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_agetParamMask0" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CFixedDiagonalCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CFixedDiagonalCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CFixedDiagonalCF *arg1 = (limix::CFixedDiagonalCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > tempshared1 ;
  std::shared_ptr< limix::CFixedDiagonalCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CFixedDiagonalCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CFixedDiagonalCF_getName" "', argument " "1"" of type '" "limix::CFixedDiagonalCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CFixedDiagonalCF > * >(argp1);
      arg1 = const_cast< limix::CFixedDiagonalCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CFixedDiagonalCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CFixedDiagonalCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CFixedDiagonalCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CPolyCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  limix::muint_t arg2 ;
  limix::muint_t arg3 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  limix::CPolyCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:new_CPolyCF",&obj0,&obj1,&obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPolyCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPolyCF" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPolyCF" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      result = (limix::CPolyCF *)new limix::CPolyCF(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CPolyCF > *smartresult = result ? new std::shared_ptr<  limix::CPolyCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CPolyCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF > tempshared1 ;
  std::shared_ptr< limix::CPolyCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CPolyCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CPolyCF" "', argument " "1"" of type '" "limix::CPolyCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF > tempshared1 ;
  std::shared_ptr< limix::CPolyCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CPolyCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_setX" "', argument " "1"" of type '" "limix::CPolyCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF > tempshared1 ;
  std::shared_ptr< limix::CPolyCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CPolyCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_setXcol" "', argument " "1"" of type '" "limix::CPolyCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CPolyCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CPolyCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_Kcross_diag" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CPolyCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CPolyCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CPolyCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CPolyCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CPolyCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CPolyCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CPolyCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CPolyCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_Kdim" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CPolyCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_agetScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF > tempshared1 ;
  std::shared_ptr< limix::CPolyCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CPolyCF_agetScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_agetScales" "', argument " "1"" of type '" "limix::CPolyCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_setParamsCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF > tempshared1 ;
  std::shared_ptr< limix::CPolyCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CPolyCF_setParamsCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_setParamsCovariance" "', argument " "1"" of type '" "limix::CPolyCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParamsCovariance((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CPolyCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_Kcross" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CPolyCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CPolyCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_Kgrad_param" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CPolyCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CPolyCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CPolyCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_Khess_param" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CPolyCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CPolyCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CPolyCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_agetParamMask0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CPolyCF_agetParamMask0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_agetParamMask0" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CPolyCF const *)arg1)->agetParamMask0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CPolyCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CPolyCF *arg1 = (limix::CPolyCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CPolyCF const > tempshared1 ;
  std::shared_ptr< limix::CPolyCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CPolyCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPolyCF_getName" "', argument " "1"" of type '" "limix::CPolyCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CPolyCF > * >(argp1);
      arg1 = const_cast< limix::CPolyCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CPolyCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CPolyCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CPolyCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CCovSqexpARD__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CCovSqexpARD *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CCovSqexpARD",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CCovSqexpARD" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CCovSqexpARD *)new limix::CCovSqexpARD(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovSqexpARD > *smartresult = result ? new std::shared_ptr<  limix::CCovSqexpARD >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CCovSqexpARD__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CCovSqexpARD")) SWIG_fail;
  {
    try {
      result = (limix::CCovSqexpARD *)new limix::CCovSqexpARD();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovSqexpARD > *smartresult = result ? new std::shared_ptr<  limix::CCovSqexpARD >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CCovSqexpARD(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CCovSqexpARD__SWIG_1(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      return _wrap_new_CCovSqexpARD__SWIG_0(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CCovSqexpARD'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CCovSqexpARD::CCovSqexpARD(limix::muint_t)\n"
    "    limix::CCovSqexpARD::CCovSqexpARD()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CCovSqexpARD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CCovSqexpARD",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CCovSqexpARD" "', argument " "1"" of type '" "limix::CCovSqexpARD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovSqexpARD_setNumberDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovSqexpARD_setNumberDimensions",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovSqexpARD_setNumberDimensions" "', argument " "1"" of type '" "limix::CCovSqexpARD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CCovSqexpARD_setNumberDimensions" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      (arg1)->setNumberDimensions(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovSqexpARD_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD const > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovSqexpARD_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovSqexpARD_Kcross" "', argument " "1"" of type '" "limix::CCovSqexpARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CCovSqexpARD const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovSqexpARD_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD const > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovSqexpARD_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovSqexpARD_Kcross_diag" "', argument " "1"" of type '" "limix::CCovSqexpARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CCovSqexpARD const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovSqexpARD_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD const > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovSqexpARD_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovSqexpARD_Kgrad_param" "', argument " "1"" of type '" "limix::CCovSqexpARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovSqexpARD_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CCovSqexpARD const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovSqexpARD_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD const > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CCovSqexpARD_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovSqexpARD_Khess_param" "', argument " "1"" of type '" "limix::CCovSqexpARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovSqexpARD_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CCovSqexpARD_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CCovSqexpARD const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovSqexpARD_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD const > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CCovSqexpARD_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovSqexpARD_Kcross_grad_X" "', argument " "1"" of type '" "limix::CCovSqexpARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CCovSqexpARD_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CCovSqexpARD const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovSqexpARD_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD const > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CCovSqexpARD_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovSqexpARD_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CCovSqexpARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CCovSqexpARD_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CCovSqexpARD const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CCovSqexpARD_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CCovSqexpARD *arg1 = (limix::CCovSqexpARD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CCovSqexpARD const > tempshared1 ;
  std::shared_ptr< limix::CCovSqexpARD const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CCovSqexpARD_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CCovSqexpARD_getName" "', argument " "1"" of type '" "limix::CCovSqexpARD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CCovSqexpARD > * >(argp1);
      arg1 = const_cast< limix::CCovSqexpARD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CCovSqexpARD const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CCovSqexpARD_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CCovSqexpARD_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_AMultiCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_AMultiCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AMultiCF" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF const > tempshared1 ;
  std::shared_ptr< limix::AMultiCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AMultiCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_Kdim" "', argument " "1"" of type '" "limix::AMultiCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::AMultiCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_addSyncChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  SwigValueWrapper< std::shared_ptr< bool > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AMultiCF_addSyncChild",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_addSyncChild" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_bool_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AMultiCF_addSyncChild" "', argument " "2"" of type '" "limix::Pbool""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AMultiCF_addSyncChild" "', argument " "2"" of type '" "limix::Pbool""'");
    } else {
      limix::Pbool * temp = reinterpret_cast< limix::Pbool * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->addSyncChild(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_delSyncChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  SwigValueWrapper< std::shared_ptr< bool > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AMultiCF_delSyncChild",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_delSyncChild" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_bool_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AMultiCF_delSyncChild" "', argument " "2"" of type '" "limix::Pbool""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AMultiCF_delSyncChild" "', argument " "2"" of type '" "limix::Pbool""'");
    } else {
      limix::Pbool * temp = reinterpret_cast< limix::Pbool * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->delSyncChild(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_addCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AMultiCF_addCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_addCovariance" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AMultiCF_addCovariance" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->addCovariance(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_setCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::muint_t arg2 ;
  limix::PCovarianceFunction arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:AMultiCF_setCovariance",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_setCovariance" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AMultiCF_setCovariance" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AMultiCF_setCovariance" "', argument " "3"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp3) arg3 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp3));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp3);
  }
  {
    try {
      (arg1)->setCovariance(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_getCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AMultiCF_getCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_getCovariance" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AMultiCF_getCovariance" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      result = (arg1)->getCovariance(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_getNumberDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF const > tempshared1 ;
  std::shared_ptr< limix::AMultiCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AMultiCF_getNumberDimensions",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_getNumberDimensions" "', argument " "1"" of type '" "limix::AMultiCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::AMultiCF const *)arg1)->getNumberDimensions();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_setNumberDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AMultiCF_setNumberDimensions",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_setNumberDimensions" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AMultiCF_setNumberDimensions" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      (arg1)->setNumberDimensions(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_getNumberParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF const > tempshared1 ;
  std::shared_ptr< limix::AMultiCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AMultiCF_getNumberParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_getNumberParams" "', argument " "1"" of type '" "limix::AMultiCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::AMultiCF const *)arg1)->getNumberParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AMultiCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_setX" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarInput *arg2 = (limix::CovarInput *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF const > tempshared1 ;
  std::shared_ptr< limix::AMultiCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:AMultiCF_getX",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_getX" "', argument " "1"" of type '" "limix::AMultiCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::AMultiCF const *)arg1)->agetX(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:AMultiCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_setXcol" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AMultiCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_setParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AMultiCF_setParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_setParams" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParams((limix::CovarParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_getParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF const > tempshared1 ;
  std::shared_ptr< limix::AMultiCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:AMultiCF_getParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_getParams" "', argument " "1"" of type '" "limix::AMultiCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::AMultiCF const *)arg1)->agetParams(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_getParamMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF const > tempshared1 ;
  std::shared_ptr< limix::AMultiCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:AMultiCF_getParamMask",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_getParamMask" "', argument " "1"" of type '" "limix::AMultiCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::AMultiCF const *)arg1)->agetParamMask(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_setParamMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AMultiCF_setParamMask",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_setParamMask" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParamMask((limix::CovarParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_getParamBounds0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  limix::CovarParams *arg3 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF const > tempshared1 ;
  std::shared_ptr< limix::AMultiCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:AMultiCF_getParamBounds0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_getParamBounds0" "', argument " "1"" of type '" "limix::AMultiCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::AMultiCF const *)arg1)->agetParamBounds0(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg3->rows(), arg3->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg3->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_getParamBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarParams *arg2 = (limix::CovarParams *) 0 ;
  limix::CovarParams *arg3 = (limix::CovarParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF const > tempshared1 ;
  std::shared_ptr< limix::AMultiCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:AMultiCF_getParamBounds",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_getParamBounds" "', argument " "1"" of type '" "limix::AMultiCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::AMultiCF const *)arg1)->agetParamBounds(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg3->rows(), arg3->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg3->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AMultiCF_setParamBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AMultiCF *arg1 = (limix::AMultiCF *) 0 ;
  limix::CovarParams *arg2 = 0 ;
  limix::CovarParams *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AMultiCF > tempshared1 ;
  std::shared_ptr< limix::AMultiCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:AMultiCF_setParamBounds",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AMultiCF_setParamBounds" "', argument " "1"" of type '" "limix::AMultiCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AMultiCF > * >(argp1);
      arg1 = const_cast< limix::AMultiCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParamBounds((limix::CovarParams const &)*arg2,(limix::CovarParams const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *AMultiCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__AMultiCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CSumCF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarVec *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CSumCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CSumCF",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CSumCF" "', argument " "1"" of type '" "limix::ACovarVec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CSumCF" "', argument " "1"" of type '" "limix::ACovarVec const &""'"); 
  }
  arg1 = reinterpret_cast< limix::ACovarVec * >(argp1);
  {
    try {
      result = (limix::CSumCF *)new limix::CSumCF((limix::ACovarVec const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CSumCF > *smartresult = result ? new std::shared_ptr<  limix::CSumCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CSumCF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CSumCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CSumCF",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CSumCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CSumCF *)new limix::CSumCF(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CSumCF > *smartresult = result ? new std::shared_ptr<  limix::CSumCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CSumCF__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CSumCF")) SWIG_fail;
  {
    try {
      result = (limix::CSumCF *)new limix::CSumCF();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CSumCF > *smartresult = result ? new std::shared_ptr<  limix::CSumCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CSumCF(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CSumCF__SWIG_2(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CSumCF__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      return _wrap_new_CSumCF__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CSumCF'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CSumCF::CSumCF(limix::ACovarVec const &)\n"
    "    limix::CSumCF::CSumCF(limix::muint_t const)\n"
    "    limix::CSumCF::CSumCF()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CSumCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF > tempshared1 ;
  std::shared_ptr< limix::CSumCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CSumCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CSumCF" "', argument " "1"" of type '" "limix::CSumCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSumCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_Kcross" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CSumCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSumCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_Kcross_diag" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CSumCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSumCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_Kgrad_param" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CSumCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CSumCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CSumCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_Khess_param" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CSumCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CSumCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CSumCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CSumCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CSumCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CSumCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSumCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CSumCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CSumCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CSumCF_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_K" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CSumCF const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_Kdiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CSumCF_Kdiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_Kdiag" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CSumCF const *)arg1)->aKdiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_Kgrad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CSumCF_Kgrad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_Kgrad_X" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CSumCF_Kgrad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CSumCF const *)arg1)->aKgrad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumCF *arg1 = (limix::CSumCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumCF const > tempshared1 ;
  std::shared_ptr< limix::CSumCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSumCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumCF_getName" "', argument " "1"" of type '" "limix::CSumCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumCF > * >(argp1);
      arg1 = const_cast< limix::CSumCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CSumCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CSumCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CLinCombCF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarVec *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CLinCombCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CLinCombCF",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CLinCombCF" "', argument " "1"" of type '" "limix::ACovarVec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CLinCombCF" "', argument " "1"" of type '" "limix::ACovarVec const &""'"); 
  }
  arg1 = reinterpret_cast< limix::ACovarVec * >(argp1);
  {
    try {
      result = (limix::CLinCombCF *)new limix::CLinCombCF((limix::ACovarVec const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinCombCF > *smartresult = result ? new std::shared_ptr<  limix::CLinCombCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLinCombCF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CLinCombCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CLinCombCF",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CLinCombCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CLinCombCF *)new limix::CLinCombCF(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinCombCF > *smartresult = result ? new std::shared_ptr<  limix::CLinCombCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLinCombCF__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CLinCombCF")) SWIG_fail;
  {
    try {
      result = (limix::CLinCombCF *)new limix::CLinCombCF();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinCombCF > *smartresult = result ? new std::shared_ptr<  limix::CLinCombCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLinCombCF(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CLinCombCF__SWIG_2(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CLinCombCF__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      return _wrap_new_CLinCombCF__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CLinCombCF'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CLinCombCF::CLinCombCF(limix::ACovarVec const &)\n"
    "    limix::CLinCombCF::CLinCombCF(limix::muint_t const)\n"
    "    limix::CLinCombCF::CLinCombCF()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CLinCombCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CLinCombCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLinCombCF" "', argument " "1"" of type '" "limix::CLinCombCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_setCoeff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinCombCF_setCoeff",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_setCoeff" "', argument " "1"" of type '" "limix::CLinCombCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setCoeff((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_agetCoeff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinCombCF_agetCoeff",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_agetCoeff" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLinCombCF const *)arg1)->agetCoeff(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinCombCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_Kcross" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinCombCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_Kcross_diag" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinCombCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_Kgrad_param" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLinCombCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CLinCombCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_Khess_param" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLinCombCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CLinCombCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CLinCombCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CLinCombCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinCombCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLinCombCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinCombCF_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_K" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_Kdiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinCombCF_Kdiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_Kdiag" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aKdiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_Kgrad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinCombCF_Kgrad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_Kgrad_X" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLinCombCF_Kgrad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CLinCombCF const *)arg1)->aKgrad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinCombCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinCombCF *arg1 = (limix::CLinCombCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinCombCF const > tempshared1 ;
  std::shared_ptr< limix::CLinCombCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinCombCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinCombCF_getName" "', argument " "1"" of type '" "limix::CLinCombCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinCombCF > * >(argp1);
      arg1 = const_cast< limix::CLinCombCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CLinCombCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CLinCombCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CLinCombCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CProductCF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ACovarVec *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CProductCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CProductCF",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CProductCF" "', argument " "1"" of type '" "limix::ACovarVec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CProductCF" "', argument " "1"" of type '" "limix::ACovarVec const &""'"); 
  }
  arg1 = reinterpret_cast< limix::ACovarVec * >(argp1);
  {
    try {
      result = (limix::CProductCF *)new limix::CProductCF((limix::ACovarVec const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CProductCF > *smartresult = result ? new std::shared_ptr<  limix::CProductCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CProductCF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CProductCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CProductCF",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CProductCF" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CProductCF *)new limix::CProductCF(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CProductCF > *smartresult = result ? new std::shared_ptr<  limix::CProductCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CProductCF__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CProductCF")) SWIG_fail;
  {
    try {
      result = (limix::CProductCF *)new limix::CProductCF();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CProductCF > *smartresult = result ? new std::shared_ptr<  limix::CProductCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CProductCF(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CProductCF__SWIG_2(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CProductCF__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      return _wrap_new_CProductCF__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CProductCF'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CProductCF::CProductCF(limix::ACovarVec const &)\n"
    "    limix::CProductCF::CProductCF(limix::muint_t const)\n"
    "    limix::CProductCF::CProductCF()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CProductCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF > tempshared1 ;
  std::shared_ptr< limix::CProductCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CProductCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CProductCF" "', argument " "1"" of type '" "limix::CProductCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CProductCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_Kcross" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CProductCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CProductCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_Kcross_diag" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CProductCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CProductCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_Kgrad_param" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CProductCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CProductCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CProductCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_Khess_param" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CProductCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CProductCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CProductCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CProductCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CProductCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CProductCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CProductCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CProductCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CProductCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CProductCF_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_K" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CProductCF const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_Kdiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CProductCF_Kdiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_Kdiag" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CProductCF const *)arg1)->aKdiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_Kgrad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CProductCF_Kgrad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_Kgrad_X" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CProductCF_Kgrad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CProductCF const *)arg1)->aKgrad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CProductCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CProductCF *arg1 = (limix::CProductCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CProductCF const > tempshared1 ;
  std::shared_ptr< limix::CProductCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CProductCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CProductCF_getName" "', argument " "1"" of type '" "limix::CProductCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CProductCF > * >(argp1);
      arg1 = const_cast< limix::CProductCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CProductCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CProductCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CProductCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CKroneckerCF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CKroneckerCF")) SWIG_fail;
  {
    try {
      result = (limix::CKroneckerCF *)new limix::CKroneckerCF();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CKroneckerCF > *smartresult = result ? new std::shared_ptr<  limix::CKroneckerCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CKroneckerCF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CKroneckerCF *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_CKroneckerCF",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CKroneckerCF" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CKroneckerCF" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      result = (limix::CKroneckerCF *)new limix::CKroneckerCF(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CKroneckerCF > *smartresult = result ? new std::shared_ptr<  limix::CKroneckerCF >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CKroneckerCF(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CKroneckerCF__SWIG_0(self, args);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_CKroneckerCF__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CKroneckerCF'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CKroneckerCF::CKroneckerCF()\n"
    "    limix::CKroneckerCF::CKroneckerCF(limix::PCovarianceFunction,limix::PCovarianceFunction)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CKroneckerCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CKroneckerCF",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CKroneckerCF" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Kdim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_Kdim",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Kdim" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CKroneckerCF const *)arg1)->Kdim();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_setRowCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_setRowCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_setRowCovariance" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CKroneckerCF_setRowCovariance" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setRowCovariance(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_setColCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_setColCovariance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_setColCovariance" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CKroneckerCF_setColCovariance" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setColCovariance(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_getRowCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_getRowCovariance",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_getRowCovariance" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getRowCovariance();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_getColCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_getColCovariance",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_getColCovariance" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getColCovariance();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_setKroneckerIndicator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  MatrixXi *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  MatrixXi temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_setKroneckerIndicator",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_setKroneckerIndicator" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_INT64, &newObject);
      break;
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg2) = Eigen::Map<MatrixXiscipy>((mint_t*)array_data( in_array ), in_rows, in_cols).cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setKroneckerIndicator((MatrixXi const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_getKroneckerIndicator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  MatrixXi *arg2 = (MatrixXi *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  MatrixXi temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_getKroneckerIndicator",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_getKroneckerIndicator" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->getKroneckerIndicator(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_INT64);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mint_t* out_data = (mint_t*)array_data(out_array);
    Eigen::Map<MatrixXiscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_isKronecker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_isKronecker",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_isKronecker" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)((limix::CKroneckerCF const *)arg1)->isKronecker();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_setX" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  limix::CovarInput *arg2 = (limix::CovarInput *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_getX",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_getX" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->agetX(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_setXcol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CKroneckerCF_setXcol",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_setXcol" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CKroneckerCF_setXcol" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      (arg1)->setXcol((limix::CovarInput const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_setXr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_setXr",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_setXr" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setXr((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_setXc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_setXc",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_setXc" "', argument " "1"" of type '" "limix::CKroneckerCF *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setXc((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Kcross" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Kcross_diag" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Kgrad_param" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CKroneckerCF_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CKroneckerCF_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Khess_param" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CKroneckerCF_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CKroneckerCF_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CKroneckerCF_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Kcross_grad_X" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CKroneckerCF_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Kdiag_grad_X" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CKroneckerCF_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_K" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Kdiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_Kdiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Kdiag" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aKdiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_Kgrad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_Kgrad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_Kgrad_X" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CKroneckerCF_Kgrad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CKroneckerCF const *)arg1)->aKgrad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerCF *arg1 = (limix::CKroneckerCF *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerCF const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerCF const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerCF_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerCF_getName" "', argument " "1"" of type '" "limix::CKroneckerCF const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerCF > * >(argp1);
      arg1 = const_cast< limix::CKroneckerCF * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CKroneckerCF const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerCF_createKroneckerIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXi *arg1 = (MatrixXi *) 0 ;
  limix::muint_t arg2 ;
  limix::muint_t arg3 ;
  MatrixXi temp1 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg1 = &temp1;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerCF_createKroneckerIndex",&obj0,&obj1)) SWIG_fail;
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CKroneckerCF_createKroneckerIndex" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CKroneckerCF_createKroneckerIndex" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      limix::CKroneckerCF::createKroneckerIndex(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg1->rows(), arg1->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_INT64);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mint_t* out_data = (mint_t*)array_data(out_array);
    Eigen::Map<MatrixXiscipy>(out_data, dims[0], dims[1]) = (*arg1);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CKroneckerCF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerCF_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_ALikelihood(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALikelihood *arg1 = (limix::ALikelihood *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALikelihood > tempshared1 ;
  std::shared_ptr< limix::ALikelihood > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_ALikelihood",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ALikelihood" "', argument " "1"" of type '" "limix::ALikelihood *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALikelihood > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALikelihood_Kcross(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALikelihood *arg1 = (limix::ALikelihood *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALikelihood const > tempshared1 ;
  std::shared_ptr< limix::ALikelihood const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:ALikelihood_Kcross",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALikelihood_Kcross" "', argument " "1"" of type '" "limix::ALikelihood const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::ALikelihood const *)arg1)->aKcross(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALikelihood_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALikelihood *arg1 = (limix::ALikelihood *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALikelihood const > tempshared1 ;
  std::shared_ptr< limix::ALikelihood const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:ALikelihood_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALikelihood_Kcross_diag" "', argument " "1"" of type '" "limix::ALikelihood const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::ALikelihood const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALikelihood_Kcross_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALikelihood *arg1 = (limix::ALikelihood *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALikelihood const > tempshared1 ;
  std::shared_ptr< limix::ALikelihood const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:ALikelihood_Kcross_grad_X",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALikelihood_Kcross_grad_X" "', argument " "1"" of type '" "limix::ALikelihood const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ALikelihood_Kcross_grad_X" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::ALikelihood const *)arg1)->aKcross_grad_X(arg2,(limix::CovarInput const &)*arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALikelihood_Kdiag_grad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALikelihood *arg1 = (limix::ALikelihood *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALikelihood const > tempshared1 ;
  std::shared_ptr< limix::ALikelihood const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:ALikelihood_Kdiag_grad_X",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALikelihood_Kdiag_grad_X" "', argument " "1"" of type '" "limix::ALikelihood const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALikelihood > * >(argp1);
      arg1 = const_cast< limix::ALikelihood * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ALikelihood_Kdiag_grad_X" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::ALikelihood const *)arg1)->aKdiag_grad_X(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ALikelihood_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CLikNormalNULL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CLikNormalNULL")) SWIG_fail;
  {
    try {
      result = (limix::CLikNormalNULL *)new limix::CLikNormalNULL();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLikNormalNULL > *smartresult = result ? new std::shared_ptr<  limix::CLikNormalNULL >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CLikNormalNULL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *arg1 = (limix::CLikNormalNULL *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalNULL > tempshared1 ;
  std::shared_ptr< limix::CLikNormalNULL > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CLikNormalNULL",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLikNormalNULL" "', argument " "1"" of type '" "limix::CLikNormalNULL *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalNULL > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalNULL_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *arg1 = (limix::CLikNormalNULL *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalNULL const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalNULL const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalNULL_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalNULL_K" "', argument " "1"" of type '" "limix::CLikNormalNULL const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLikNormalNULL const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalNULL_Kdiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *arg1 = (limix::CLikNormalNULL *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalNULL const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalNULL const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalNULL_Kdiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalNULL_Kdiag" "', argument " "1"" of type '" "limix::CLikNormalNULL const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLikNormalNULL const *)arg1)->aKdiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalNULL_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *arg1 = (limix::CLikNormalNULL *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalNULL const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalNULL const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalNULL_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalNULL_Kcross_diag" "', argument " "1"" of type '" "limix::CLikNormalNULL const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CLikNormalNULL const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalNULL_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *arg1 = (limix::CLikNormalNULL *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalNULL const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalNULL const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalNULL_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalNULL_Kgrad_param" "', argument " "1"" of type '" "limix::CLikNormalNULL const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLikNormalNULL_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CLikNormalNULL const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalNULL_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *arg1 = (limix::CLikNormalNULL *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalNULL const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalNULL const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CLikNormalNULL_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalNULL_Khess_param" "', argument " "1"" of type '" "limix::CLikNormalNULL const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLikNormalNULL_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CLikNormalNULL_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CLikNormalNULL const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalNULL_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *arg1 = (limix::CLikNormalNULL *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalNULL > tempshared1 ;
  std::shared_ptr< limix::CLikNormalNULL > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalNULL_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalNULL_setX" "', argument " "1"" of type '" "limix::CLikNormalNULL *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalNULL > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalNULL_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalNULL *arg1 = (limix::CLikNormalNULL *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalNULL const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalNULL const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalNULL_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalNULL_getName" "', argument " "1"" of type '" "limix::CLikNormalNULL const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalNULL > * >(argp1);
      arg1 = const_cast< limix::CLikNormalNULL * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CLikNormalNULL const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CLikNormalNULL_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalNULL_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CLikNormalIso(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CLikNormalIso")) SWIG_fail;
  {
    try {
      result = (limix::CLikNormalIso *)new limix::CLikNormalIso();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLikNormalIso > *smartresult = result ? new std::shared_ptr<  limix::CLikNormalIso >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CLikNormalIso(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *arg1 = (limix::CLikNormalIso *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalIso > tempshared1 ;
  std::shared_ptr< limix::CLikNormalIso > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CLikNormalIso",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLikNormalIso" "', argument " "1"" of type '" "limix::CLikNormalIso *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalIso > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalIso_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *arg1 = (limix::CLikNormalIso *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalIso const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalIso const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalIso_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalIso_K" "', argument " "1"" of type '" "limix::CLikNormalIso const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLikNormalIso const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalIso_Kdiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *arg1 = (limix::CLikNormalIso *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalIso const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalIso const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalIso_Kdiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalIso_Kdiag" "', argument " "1"" of type '" "limix::CLikNormalIso const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLikNormalIso const *)arg1)->aKdiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalIso_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *arg1 = (limix::CLikNormalIso *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalIso const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalIso const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalIso_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalIso_Kcross_diag" "', argument " "1"" of type '" "limix::CLikNormalIso const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CLikNormalIso const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalIso_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *arg1 = (limix::CLikNormalIso *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalIso const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalIso const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalIso_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalIso_Kgrad_param" "', argument " "1"" of type '" "limix::CLikNormalIso const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLikNormalIso_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CLikNormalIso const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalIso_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *arg1 = (limix::CLikNormalIso *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalIso const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalIso const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CLikNormalIso_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalIso_Khess_param" "', argument " "1"" of type '" "limix::CLikNormalIso const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLikNormalIso_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CLikNormalIso_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CLikNormalIso const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalIso_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *arg1 = (limix::CLikNormalIso *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalIso > tempshared1 ;
  std::shared_ptr< limix::CLikNormalIso > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalIso_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalIso_setX" "', argument " "1"" of type '" "limix::CLikNormalIso *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalIso > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalIso_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalIso *arg1 = (limix::CLikNormalIso *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalIso const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalIso const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalIso_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalIso_getName" "', argument " "1"" of type '" "limix::CLikNormalIso const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalIso > * >(argp1);
      arg1 = const_cast< limix::CLikNormalIso * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CLikNormalIso const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CLikNormalIso_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalIso_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CLikNormalSVD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CLikNormalSVD")) SWIG_fail;
  {
    try {
      result = (limix::CLikNormalSVD *)new limix::CLikNormalSVD();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLikNormalSVD > *smartresult = result ? new std::shared_ptr<  limix::CLikNormalSVD >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CLikNormalSVD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CLikNormalSVD",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLikNormalSVD" "', argument " "1"" of type '" "limix::CLikNormalSVD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalSVD_K",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_K" "', argument " "1"" of type '" "limix::CLikNormalSVD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLikNormalSVD const *)arg1)->aK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_Kdiag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalSVD_Kdiag",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_Kdiag" "', argument " "1"" of type '" "limix::CLikNormalSVD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLikNormalSVD const *)arg1)->aKdiag(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_Kcross_diag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CovarInput *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalSVD_Kcross_diag",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_Kcross_diag" "', argument " "1"" of type '" "limix::CLikNormalSVD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CLikNormalSVD const *)arg1)->aKcross_diag(arg2,(limix::CovarInput const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_Kgrad_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalSVD_Kgrad_param",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_Kgrad_param" "', argument " "1"" of type '" "limix::CLikNormalSVD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLikNormalSVD_Kgrad_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CLikNormalSVD const *)arg1)->aKgrad_param(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_Khess_param(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CLikNormalSVD_Khess_param",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_Khess_param" "', argument " "1"" of type '" "limix::CLikNormalSVD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CLikNormalSVD_Khess_param" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CLikNormalSVD_Khess_param" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      ((limix::CLikNormalSVD const *)arg1)->aKhess_param(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLikNormalSVD_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_setX" "', argument " "1"" of type '" "limix::CLikNormalSVD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_getSigmaK2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalSVD_getSigmaK2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_getSigmaK2" "', argument " "1"" of type '" "limix::CLikNormalSVD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getSigmaK2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_getDelta(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalSVD_getDelta",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_getDelta" "', argument " "1"" of type '" "limix::CLikNormalSVD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getDelta();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_getSigmaK2grad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalSVD_getSigmaK2grad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_getSigmaK2grad" "', argument " "1"" of type '" "limix::CLikNormalSVD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getSigmaK2grad();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_getDeltagrad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalSVD_getDeltagrad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_getDeltagrad" "', argument " "1"" of type '" "limix::CLikNormalSVD *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getDeltagrad();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLikNormalSVD_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLikNormalSVD *arg1 = (limix::CLikNormalSVD *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLikNormalSVD const > tempshared1 ;
  std::shared_ptr< limix::CLikNormalSVD const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLikNormalSVD_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLikNormalSVD_getName" "', argument " "1"" of type '" "limix::CLikNormalSVD const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLikNormalSVD > * >(argp1);
      arg1 = const_cast< limix::CLikNormalSVD * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CLikNormalSVD const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CLikNormalSVD_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_ADataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_ADataTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ADataTerm" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_setParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ADataTerm_setParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_setParams" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParams((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_aGetParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_aGetParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_aGetParams" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGetParams(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_getParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_getParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_getParams" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ADataTerm_setY",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_setY" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setY((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_getRowsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_getRowsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_getRowsParams" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getRowsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_getColsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_getColsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_getColsParams" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getColsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_evaluate",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_evaluate" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aEvaluate(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_gradY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_gradY",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_gradY" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGradY(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_aGradParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_aGradParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_aGradParams" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGradParams(arg2,(MatrixXd const *)arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg3->rows(), arg3->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_sumJacobianGradParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_sumJacobianGradParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_sumJacobianGradParams" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aSumJacobianGradParams(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_sumLogJacobian(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_sumLogJacobian",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_sumLogJacobian" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aSumLogJacobian(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_getY",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_getY" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getY();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_gradParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ADataTerm_gradParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_gradParams" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (arg1)->gradParams((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm const > tempshared1 ;
  std::shared_ptr< limix::ADataTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ADataTerm_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_getName" "', argument " "1"" of type '" "limix::ADataTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::ADataTerm const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ADataTerm_checkDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ADataTerm *arg1 = (limix::ADataTerm *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ADataTerm > tempshared1 ;
  std::shared_ptr< limix::ADataTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ADataTerm_checkDimensions",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ADataTerm_checkDimensions" "', argument " "1"" of type '" "limix::ADataTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ADataTerm > * >(argp1);
      arg1 = const_cast< limix::ADataTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->checkDimensions((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ADataTerm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CData__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CData *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CData")) SWIG_fail;
  {
    try {
      result = (limix::CData *)new limix::CData();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CData > *smartresult = result ? new std::shared_ptr<  limix::CData >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CData_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CData__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CData *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CData",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CData" "', argument " "1"" of type '" "MatrixXd &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CData" "', argument " "1"" of type '" "MatrixXd &""'"); 
  }
  arg1 = reinterpret_cast< MatrixXd * >(argp1);
  {
    try {
      result = (limix::CData *)new limix::CData(*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CData > *smartresult = result ? new std::shared_ptr<  limix::CData >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CData_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CData(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CData__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      _v = (array_type(argv[0]) == NPY_FLOAT) || (array_type(argv[0]) == NPY_DOUBLE);
    }
    if (_v) {
      return _wrap_new_CData__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CData'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CData::CData()\n"
    "    limix::CData::CData(MatrixXd &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CData *arg1 = (limix::CData *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CData > tempshared1 ;
  std::shared_ptr< limix::CData > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CData",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CData_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CData" "', argument " "1"" of type '" "limix::CData *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      arg1 = const_cast< limix::CData * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      arg1 = const_cast< limix::CData * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CData_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CData *arg1 = (limix::CData *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CData const > tempshared1 ;
  std::shared_ptr< limix::CData const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CData_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CData_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CData_getName" "', argument " "1"" of type '" "limix::CData const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CData > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CData > * >(argp1);
      arg1 = const_cast< limix::CData * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CData > * >(argp1);
      arg1 = const_cast< limix::CData * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CData const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CData_getRowsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CData *arg1 = (limix::CData *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CData > tempshared1 ;
  std::shared_ptr< limix::CData > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CData_getRowsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CData_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CData_getRowsParams" "', argument " "1"" of type '" "limix::CData *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      arg1 = const_cast< limix::CData * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      arg1 = const_cast< limix::CData * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getRowsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CData_getColsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CData *arg1 = (limix::CData *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CData > tempshared1 ;
  std::shared_ptr< limix::CData > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CData_getColsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CData_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CData_getColsParams" "', argument " "1"" of type '" "limix::CData *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      arg1 = const_cast< limix::CData * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CData > * >(argp1);
      arg1 = const_cast< limix::CData * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getColsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CData_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CData_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CLinearMean__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CLinearMean")) SWIG_fail;
  {
    try {
      result = (limix::CLinearMean *)new limix::CLinearMean();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinearMean > *smartresult = result ? new std::shared_ptr<  limix::CLinearMean >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLinearMean__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CLinearMean *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CLinearMean",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CLinearMean" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CLinearMean *)new limix::CLinearMean(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinearMean > *smartresult = result ? new std::shared_ptr<  limix::CLinearMean >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLinearMean__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd temp1 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  limix::CLinearMean *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:new_CLinearMean",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (limix::CLinearMean *)new limix::CLinearMean((MatrixXd const &)*arg1,(MatrixXd const &)*arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinearMean > *smartresult = result ? new std::shared_ptr<  limix::CLinearMean >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLinearMean__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd temp1 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CLinearMean *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_CLinearMean",&obj0,&obj1)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (limix::CLinearMean *)new limix::CLinearMean((MatrixXd const &)*arg1,(MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinearMean > *smartresult = result ? new std::shared_ptr<  limix::CLinearMean >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CLinearMean(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CLinearMean__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      return _wrap_new_CLinearMean__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (array_type(argv[0]) == NPY_FLOAT) || (array_type(argv[0]) == NPY_DOUBLE);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_new_CLinearMean__SWIG_3(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (array_type(argv[0]) == NPY_FLOAT) || (array_type(argv[0]) == NPY_DOUBLE);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_new_CLinearMean__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CLinearMean'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CLinearMean::CLinearMean()\n"
    "    limix::CLinearMean::CLinearMean(limix::muint_t)\n"
    "    limix::CLinearMean::CLinearMean(MatrixXd const &,MatrixXd const &,MatrixXd const &)\n"
    "    limix::CLinearMean::CLinearMean(MatrixXd const &,MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CLinearMean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CLinearMean",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLinearMean" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_agetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_agetA",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_agetA" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetA(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_getA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_getA",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_getA" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getA();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_evaluate",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_evaluate" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aEvaluate(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_aGradParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_aGradParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_aGradParams" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGradParams(arg2,(MatrixXd const *)arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg3->rows(), arg3->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_setParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinearMean_setParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_setParams" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParams((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_setFixedEffects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinearMean_setFixedEffects",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_setFixedEffects" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setFixedEffects((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_aGetParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_aGetParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_aGetParams" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGetParams(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_aGetFixedEffects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_aGetFixedEffects",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_aGetFixedEffects" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGetFixedEffects(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_aPredictY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_aPredictY",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_aPredictY" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLinearMean const *)arg1)->aPredictY(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_aPredictYstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_aPredictYstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_aPredictYstar" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CLinearMean const *)arg1)->aPredictYstar(arg2,(MatrixXd const *)arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg3->rows(), arg3->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_getRowsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_getRowsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_getRowsParams" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getRowsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_getColsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_getColsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_getColsParams" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getColsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_getFixedEffects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_getFixedEffects",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_getFixedEffects" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getFixedEffects();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_getName" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CLinearMean const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_checkDimensions__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinearMean_checkDimensions",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_checkDimensions" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->checkDimensions((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_checkDimensions__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  bool arg5 ;
  bool arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:CLinearMean_checkDimensions",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_checkDimensions" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CLinearMean_checkDimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CLinearMean_checkDimensions" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CLinearMean_checkDimensions" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      ((limix::CLinearMean const *)arg1)->checkDimensions((MatrixXd const &)*arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4,arg5,arg6,arg7);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_checkDimensions__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:CLinearMean_checkDimensions",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_checkDimensions" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CLinearMean_checkDimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CLinearMean_checkDimensions" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      ((limix::CLinearMean const *)arg1)->checkDimensions((MatrixXd const &)*arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4,arg5,arg6);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_checkDimensions__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOO:CLinearMean_checkDimensions",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_checkDimensions" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CLinearMean_checkDimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      ((limix::CLinearMean const *)arg1)->checkDimensions((MatrixXd const &)*arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4,arg5);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_checkDimensions__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:CLinearMean_checkDimensions",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_checkDimensions" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      ((limix::CLinearMean const *)arg1)->checkDimensions((MatrixXd const &)*arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_checkDimensions(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[8] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_CLinearMean_checkDimensions__SWIG_0(self, args);
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            return _wrap_CLinearMean_checkDimensions__SWIG_4(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            {
              _v = (PyInt_Check(argv[4]) || PyLong_Check(argv[4])) ? 1 : 0;
            }
            if (_v) {
              return _wrap_CLinearMean_checkDimensions__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            {
              _v = (PyInt_Check(argv[4]) || PyLong_Check(argv[4])) ? 1 : 0;
            }
            if (_v) {
              {
                _v = (PyInt_Check(argv[5]) || PyLong_Check(argv[5])) ? 1 : 0;
              }
              if (_v) {
                return _wrap_CLinearMean_checkDimensions__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            {
              _v = (PyInt_Check(argv[4]) || PyLong_Check(argv[4])) ? 1 : 0;
            }
            if (_v) {
              {
                _v = (PyInt_Check(argv[5]) || PyLong_Check(argv[5])) ? 1 : 0;
              }
              if (_v) {
                {
                  _v = (PyInt_Check(argv[6]) || PyLong_Check(argv[6])) ? 1 : 0;
                }
                if (_v) {
                  return _wrap_CLinearMean_checkDimensions__SWIG_1(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CLinearMean_checkDimensions'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CLinearMean::checkDimensions(MatrixXd const &)\n"
    "    limix::CLinearMean::checkDimensions(MatrixXd const &,MatrixXd const &,MatrixXd const &,bool const,bool const,bool const) const\n"
    "    limix::CLinearMean::checkDimensions(MatrixXd const &,MatrixXd const &,MatrixXd const &,bool const,bool const) const\n"
    "    limix::CLinearMean::checkDimensions(MatrixXd const &,MatrixXd const &,MatrixXd const &,bool const) const\n"
    "    limix::CLinearMean::checkDimensions(MatrixXd const &,MatrixXd const &,MatrixXd const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CLinearMean_predictY__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_predictY",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_predictY" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CLinearMean const *)arg1)->predictY();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_predictY__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinearMean_predictY",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_predictY" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = ((limix::CLinearMean const *)arg1)->predictY((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_predictY(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CLinearMean_predictY__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_CLinearMean_predictY__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CLinearMean_predictY'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CLinearMean::predictY() const\n"
    "    limix::CLinearMean::predictY(MatrixXd const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CLinearMean_setWeightsOLS__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_setWeightsOLS",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_setWeightsOLS" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->setWeightsOLS();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_setWeightsOLS__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean > tempshared1 ;
  std::shared_ptr< limix::CLinearMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLinearMean_setWeightsOLS",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_setWeightsOLS" "', argument " "1"" of type '" "limix::CLinearMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setWeightsOLS((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLinearMean_setWeightsOLS(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CLinearMean_setWeightsOLS__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_CLinearMean_setWeightsOLS__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CLinearMean_setWeightsOLS'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CLinearMean::setWeightsOLS()\n"
    "    limix::CLinearMean::setWeightsOLS(MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CLinearMean_getNTargets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLinearMean *arg1 = (limix::CLinearMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLinearMean const > tempshared1 ;
  std::shared_ptr< limix::CLinearMean const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLinearMean_getNTargets",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLinearMean_getNTargets" "', argument " "1"" of type '" "limix::CLinearMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLinearMean > * >(argp1);
      arg1 = const_cast< limix::CLinearMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CLinearMean const *)arg1)->getNTargets();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CLinearMean_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CSumLinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CSumLinear")) SWIG_fail;
  {
    try {
      result = (limix::CSumLinear *)new limix::CSumLinear();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CSumLinear > *smartresult = result ? new std::shared_ptr<  limix::CSumLinear >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CSumLinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CSumLinear",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CSumLinear" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_aGetParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CSumLinear_aGetParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_aGetParams" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGetParams(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_setParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CSumLinear_setParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_setParams" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setParams((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CSumLinear_evaluate",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_evaluate" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aEvaluate(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_aGradParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CSumLinear_aGradParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_aGradParams" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGradParams(arg2,(MatrixXd const *)arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg3->rows(), arg3->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_appendTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  limix::PLinearMean arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CSumLinear_appendTerm",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_appendTerm" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CSumLinear_appendTerm" "', argument " "2"" of type '" "limix::PLinearMean""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PLinearMean * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PLinearMean * >(argp2);
  }
  {
    try {
      (arg1)->appendTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_getTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::PLinearMean result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CSumLinear_getTerm",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_getTerm" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CSumLinear_getTerm" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      result = (arg1)->getTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinearMean > *smartresult = result ? new std::shared_ptr<  limix::CLinearMean >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_getNterms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear const > tempshared1 ;
  std::shared_ptr< limix::CSumLinear const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSumLinear_getNterms",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_getNterms" "', argument " "1"" of type '" "limix::CSumLinear const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CSumLinear const *)arg1)->getNterms();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_getTerms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::VecLinearMean *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSumLinear_getTerms",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_getTerms" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::VecLinearMean *) &(arg1)->getTerms();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__shared_ptrT_limix__CLinearMean_t_std__allocatorT_std__shared_ptrT_limix__CLinearMean_t_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_getRowsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSumLinear_getRowsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_getRowsParams" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getRowsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSumLinear_getColsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSumLinear *arg1 = (limix::CSumLinear *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSumLinear > tempshared1 ;
  std::shared_ptr< limix::CSumLinear > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSumLinear_getColsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSumLinear_getColsParams" "', argument " "1"" of type '" "limix::CSumLinear *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSumLinear > * >(argp1);
      arg1 = const_cast< limix::CSumLinear * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getColsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CSumLinear_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CSumLinear_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CKroneckerMean__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CKroneckerMean")) SWIG_fail;
  {
    try {
      result = (limix::CKroneckerMean *)new limix::CKroneckerMean();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CKroneckerMean > *smartresult = result ? new std::shared_ptr<  limix::CKroneckerMean >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CKroneckerMean__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  limix::CKroneckerMean *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:new_CKroneckerMean",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CKroneckerMean" "', argument " "1"" of type '" "MatrixXd &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CKroneckerMean" "', argument " "1"" of type '" "MatrixXd &""'"); 
  }
  arg1 = reinterpret_cast< MatrixXd * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CKroneckerMean" "', argument " "2"" of type '" "MatrixXd &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CKroneckerMean" "', argument " "2"" of type '" "MatrixXd &""'"); 
  }
  arg2 = reinterpret_cast< MatrixXd * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CKroneckerMean" "', argument " "3"" of type '" "MatrixXd &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CKroneckerMean" "', argument " "3"" of type '" "MatrixXd &""'"); 
  }
  arg3 = reinterpret_cast< MatrixXd * >(argp3);
  {
    try {
      result = (limix::CKroneckerMean *)new limix::CKroneckerMean(*arg1,*arg2,*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CKroneckerMean > *smartresult = result ? new std::shared_ptr<  limix::CKroneckerMean >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CKroneckerMean__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  limix::CKroneckerMean *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_CKroneckerMean",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CKroneckerMean" "', argument " "1"" of type '" "MatrixXd &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CKroneckerMean" "', argument " "1"" of type '" "MatrixXd &""'"); 
  }
  arg1 = reinterpret_cast< MatrixXd * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CKroneckerMean" "', argument " "2"" of type '" "MatrixXd &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CKroneckerMean" "', argument " "2"" of type '" "MatrixXd &""'"); 
  }
  arg2 = reinterpret_cast< MatrixXd * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CKroneckerMean" "', argument " "3"" of type '" "MatrixXd &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CKroneckerMean" "', argument " "3"" of type '" "MatrixXd &""'"); 
  }
  arg3 = reinterpret_cast< MatrixXd * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CKroneckerMean" "', argument " "4"" of type '" "MatrixXd &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CKroneckerMean" "', argument " "4"" of type '" "MatrixXd &""'"); 
  }
  arg4 = reinterpret_cast< MatrixXd * >(argp4);
  {
    try {
      result = (limix::CKroneckerMean *)new limix::CKroneckerMean(*arg1,*arg2,*arg3,*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CKroneckerMean > *smartresult = result ? new std::shared_ptr<  limix::CKroneckerMean >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CKroneckerMean(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CKroneckerMean__SWIG_0(self, args);
  }
  if (argc == 3) {
    int _v;
    {
      _v = (array_type(argv[0]) == NPY_FLOAT) || (array_type(argv[0]) == NPY_DOUBLE);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_new_CKroneckerMean__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = (array_type(argv[0]) == NPY_FLOAT) || (array_type(argv[0]) == NPY_DOUBLE);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            return _wrap_new_CKroneckerMean__SWIG_2(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CKroneckerMean'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CKroneckerMean::CKroneckerMean()\n"
    "    limix::CKroneckerMean::CKroneckerMean(MatrixXd &,MatrixXd &,MatrixXd &)\n"
    "    limix::CKroneckerMean::CKroneckerMean(MatrixXd &,MatrixXd &,MatrixXd &,MatrixXd &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CKroneckerMean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CKroneckerMean",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CKroneckerMean" "', argument " "1"" of type '" "limix::CKroneckerMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_setA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerMean_setA",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_setA" "', argument " "1"" of type '" "limix::CKroneckerMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setA((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_agetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerMean_agetA",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_agetA" "', argument " "1"" of type '" "limix::CKroneckerMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetA(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_setWeightsOLS__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerMean_setWeightsOLS",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_setWeightsOLS" "', argument " "1"" of type '" "limix::CKroneckerMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setWeightsOLS((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerMean_evaluate",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_evaluate" "', argument " "1"" of type '" "limix::CKroneckerMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aEvaluate(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_aPredictY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerMean_aPredictY",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_aPredictY" "', argument " "1"" of type '" "limix::CKroneckerMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CKroneckerMean const *)arg1)->aPredictY(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_aGradParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerMean_aGradParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_aGradParams" "', argument " "1"" of type '" "limix::CKroneckerMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aGradParams(arg2,(MatrixXd const *)arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg3->rows(), arg3->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_setWeightsOLS__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerMean_setWeightsOLS",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_setWeightsOLS" "', argument " "1"" of type '" "limix::CKroneckerMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->setWeightsOLS();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_setWeightsOLS(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CKroneckerMean_setWeightsOLS__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_CKroneckerMean_setWeightsOLS__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CKroneckerMean_setWeightsOLS'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CKroneckerMean::setWeightsOLS(MatrixXd const &)\n"
    "    limix::CKroneckerMean::setWeightsOLS()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_checkDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  MatrixXd *arg2 = 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CKroneckerMean_checkDimensions",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_checkDimensions" "', argument " "1"" of type '" "limix::CKroneckerMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CKroneckerMean_checkDimensions" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      ((limix::CKroneckerMean const *)arg1)->checkDimensions((MatrixXd const &)*arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerMean_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_getName" "', argument " "1"" of type '" "limix::CKroneckerMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CKroneckerMean const *)arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_getDimFixedEffects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean const > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerMean_getDimFixedEffects",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_getDimFixedEffects" "', argument " "1"" of type '" "limix::CKroneckerMean const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CKroneckerMean const *)arg1)->getDimFixedEffects();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerMean_getColsParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerMean *arg1 = (limix::CKroneckerMean *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerMean > tempshared1 ;
  std::shared_ptr< limix::CKroneckerMean > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerMean_getColsParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerMean_getColsParams" "', argument " "1"" of type '" "limix::CKroneckerMean *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerMean > * >(argp1);
      arg1 = const_cast< limix::CKroneckerMean * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getColsParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CKroneckerMean_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerMean_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CGPHyperParams__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CGPHyperParams")) SWIG_fail;
  {
    try {
      result = (limix::CGPHyperParams *)new limix::CGPHyperParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = result ? new std::shared_ptr<  limix::CGPHyperParams >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPHyperParams__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared1 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CGPHyperParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPHyperParams" "', argument " "1"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CGPHyperParams" "', argument " "1"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1)->get());
    }
  }
  {
    try {
      result = (limix::CGPHyperParams *)new limix::CGPHyperParams((limix::CGPHyperParams const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = result ? new std::shared_ptr<  limix::CGPHyperParams >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPHyperParams(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CGPHyperParams__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CGPHyperParams__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CGPHyperParams'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPHyperParams::CGPHyperParams()\n"
    "    limix::CGPHyperParams::CGPHyperParams(limix::CGPHyperParams const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CGPHyperParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPHyperParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPHyperParams" "', argument " "1"" of type '" "limix::CGPHyperParams *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_getParamArray__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPHyperParams_getParamArray",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams_getParamArray" "', argument " "1"" of type '" "limix::CGPHyperParams const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CGPHyperParams const *)arg1)->agetParamArray(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_setParamArray__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPHyperParams_setParamArray",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams_setParamArray" "', argument " "1"" of type '" "limix::CGPHyperParams *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParamArray((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_getParamArray__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CGPHyperParams *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPHyperParams_getParamArray",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams_getParamArray" "', argument " "1"" of type '" "limix::CGPHyperParams const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj1, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CGPHyperParams_getParamArray" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPHyperParams_getParamArray" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared3 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      arg3 = const_cast< limix::CGPHyperParams * >(tempshared3.get());
    } else {
      arg3 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3)->get());
    }
  }
  {
    try {
      ((limix::CGPHyperParams const *)arg1)->agetParamArray(arg2,(limix::CGPHyperParams const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_getParamArray(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPHyperParams_getParamArray__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPHyperParams_getParamArray__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPHyperParams_getParamArray'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPHyperParams::agetParamArray(VectorXd *) const\n"
    "    limix::CGPHyperParams::agetParamArray(VectorXd *,limix::CGPHyperParams const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_setParamArray__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  VectorXd *arg2 = 0 ;
  limix::CGPHyperParams *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams > *smartarg1 = 0 ;
  VectorXd temp2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CGPHyperParams_setParamArray",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams_setParamArray" "', argument " "1"" of type '" "limix::CGPHyperParams *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CGPHyperParams_setParamArray" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPHyperParams_setParamArray" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared3 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      arg3 = const_cast< limix::CGPHyperParams * >(tempshared3.get());
    } else {
      arg3 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3)->get());
    }
  }
  {
    try {
      (arg1)->setParamArray((VectorXd const &)*arg2,(limix::CGPHyperParams const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_setParamArray(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPHyperParams_setParamArray__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_CGPHyperParams_setParamArray__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPHyperParams_setParamArray'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPHyperParams::setParamArray(VectorXd const &)\n"
    "    limix::CGPHyperParams::setParamArray(VectorXd const &,limix::CGPHyperParams const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_getNumberParams__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPHyperParams_getNumberParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams_getNumberParams" "', argument " "1"" of type '" "limix::CGPHyperParams const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CGPHyperParams const *)arg1)->getNumberParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_getNumberParams__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  limix::CGPHyperParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams const > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPHyperParams_getNumberParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams_getNumberParams" "', argument " "1"" of type '" "limix::CGPHyperParams const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPHyperParams_getNumberParams" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPHyperParams_getNumberParams" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      arg2 = const_cast< limix::CGPHyperParams * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2)->get());
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CGPHyperParams const *)arg1)->getNumberParams((limix::CGPHyperParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_getNumberParams(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPHyperParams_getNumberParams__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPHyperParams_getNumberParams__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPHyperParams_getNumberParams'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPHyperParams::getNumberParams() const\n"
    "    limix::CGPHyperParams::getNumberParams(limix::CGPHyperParams const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  std::string *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CGPHyperParams___setitem__",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams___setitem__" "', argument " "1"" of type '" "limix::CGPHyperParams *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPHyperParams___setitem__" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPHyperParams___setitem__" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->set((std::string const &)*arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  std::string *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPHyperParams___getitem__",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams___getitem__" "', argument " "1"" of type '" "limix::CGPHyperParams *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CGPHyperParams___getitem__" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPHyperParams___getitem__" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->aget(arg2,(std::string const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_getNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::string,std::allocator< std::string > > result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPHyperParams_getNames",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams_getNames" "', argument " "1"" of type '" "limix::CGPHyperParams const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPHyperParams const *)arg1)->getNames();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = swig::from(static_cast< std::vector< std::string,std::allocator< std::string > > >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams_exists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  std::string arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPHyperParams_exists",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams_exists" "', argument " "1"" of type '" "limix::CGPHyperParams const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "CGPHyperParams_exists" "', argument " "2"" of type '" "std::string""'"); 
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      result = (bool)((limix::CGPHyperParams const *)arg1)->exists(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPHyperParams___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPHyperParams *arg1 = (limix::CGPHyperParams *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared1 ;
  std::shared_ptr< limix::CGPHyperParams const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPHyperParams___str__",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPHyperParams___str__" "', argument " "1"" of type '" "limix::CGPHyperParams const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp1);
      arg1 = const_cast< limix::CGPHyperParams * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPHyperParams const *)arg1)->toString();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPHyperParams_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CGPCholCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPCholCache *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CGPCholCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPCholCache" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::CGPCholCache *)new limix::CGPCholCache(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPCholCache > *smartresult = result ? new std::shared_ptr<  limix::CGPCholCache >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CGPCholCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPCholCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPCholCache" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPCholCache_getCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPCholCache_getCovar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPCholCache_getCovar" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPCholCache_setCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPCholCache_setCovar",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPCholCache_setCovar" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPCholCache_setCovar" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setCovar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPCholCache_rgetKEff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPCholCache_rgetKEff",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPCholCache_rgetKEff" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetKEff();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPCholCache_rgetKEffChol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXdChol *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPCholCache_rgetKEffChol",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPCholCache_rgetKEffChol" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXdChol *) &(arg1)->rgetKEffChol();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXdChol, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPCholCache_rgetKEffInv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPCholCache_rgetKEffInv",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPCholCache_rgetKEffInv" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetKEffInv();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPCholCache_rgetYeffective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPCholCache_rgetYeffective",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPCholCache_rgetYeffective" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetYeffective();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPCholCache_rgetKEffInvY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPCholCache_rgetKEffInvY",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPCholCache_rgetKEffInvY" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetKEffInvY();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPCholCache_getDKEffInv_KEffInvYYKinv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPCholCache *arg1 = (limix::CGPCholCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPCholCache > tempshared1 ;
  std::shared_ptr< limix::CGPCholCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPCholCache_getDKEffInv_KEffInvYYKinv",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPCholCache_getDKEffInv_KEffInvYYKinv" "', argument " "1"" of type '" "limix::CGPCholCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPCholCache > * >(argp1);
      arg1 = const_cast< limix::CGPCholCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->getDKEffInv_KEffInvYYKinv();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPCholCache_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CGPbase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  limix::PLikelihood arg2 ;
  limix::PDataTerm arg3 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  limix::CGPbase *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:new_CGPbase",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPbase" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGPbase" "', argument " "2"" of type '" "limix::PLikelihood""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PLikelihood * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PLikelihood * >(argp2);
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CGPbase" "', argument " "3"" of type '" "limix::PDataTerm""'"); 
    }
    if (argp3) arg3 = *(reinterpret_cast< limix::PDataTerm * >(argp3));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PDataTerm * >(argp3);
  }
  {
    try {
      result = (limix::CGPbase *)new limix::CGPbase(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPbase > *smartresult = result ? new std::shared_ptr<  limix::CGPbase >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPbase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  limix::PLikelihood arg2 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CGPbase *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_CGPbase",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPbase" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGPbase" "', argument " "2"" of type '" "limix::PLikelihood""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PLikelihood * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PLikelihood * >(argp2);
  }
  {
    try {
      result = (limix::CGPbase *)new limix::CGPbase(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPbase > *smartresult = result ? new std::shared_ptr<  limix::CGPbase >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPbase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  void *argp1 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPbase *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CGPbase",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPbase" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    try {
      result = (limix::CGPbase *)new limix::CGPbase(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPbase > *smartresult = result ? new std::shared_ptr<  limix::CGPbase >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPbase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CGPbase__SWIG_2(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_CGPbase__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_CGPbase__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CGPbase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPbase::CGPbase(limix::PCovarianceFunction,limix::PLikelihood,limix::PDataTerm)\n"
    "    limix::CGPbase::CGPbase(limix::PCovarianceFunction,limix::PLikelihood)\n"
    "    limix::CGPbase::CGPbase(limix::PCovarianceFunction)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CGPbase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPbase",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPbase" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_set_data",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_set_data" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPbase_set_data" "', argument " "2"" of type '" "MatrixXd &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_set_data" "', argument " "2"" of type '" "MatrixXd &""'"); 
  }
  arg2 = reinterpret_cast< MatrixXd * >(argp2);
  {
    try {
      (arg1)->set_data(*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setCovar",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setCovar" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPbase_setCovar" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setCovar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setLik(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::PLikelihood arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setLik",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setLik" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPbase_setLik" "', argument " "2"" of type '" "limix::PLikelihood""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PLikelihood * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PLikelihood * >(argp2);
  }
  {
    try {
      (arg1)->setLik(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setDataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::PDataTerm arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setDataTerm",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setDataTerm" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPbase_setDataTerm" "', argument " "2"" of type '" "limix::PDataTerm""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PDataTerm * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PDataTerm * >(argp2);
  }
  {
    try {
      (arg1)->setDataTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setLambda(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setLambda",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setLambda" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPbase_setLambda" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLambda(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setLambdaG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setLambdaG",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setLambdaG" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPbase_setLambdaG" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLambdaG(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setLambdaN(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setLambdaN",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setLambdaN" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPbase_setLambdaN" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLambdaN(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setParams__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::CGPHyperParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setParams" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPbase_setParams" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_setParams" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      arg2 = const_cast< limix::CGPHyperParams * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2)->get());
    }
  }
  {
    try {
      (arg1)->setParams((limix::CGPHyperParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setParams__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::CGPHyperParams *arg2 = 0 ;
  limix::CGPHyperParams *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CGPbase_setParams",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setParams" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPbase_setParams" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_setParams" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      arg2 = const_cast< limix::CGPHyperParams * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2)->get());
    }
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CGPbase_setParams" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_setParams" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared3 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      arg3 = const_cast< limix::CGPHyperParams * >(tempshared3.get());
    } else {
      arg3 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3)->get());
    }
  }
  {
    try {
      (arg1)->setParams((limix::CGPHyperParams const &)*arg2,(limix::CGPHyperParams const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setParams(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPbase_setParams__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_CGPbase_setParams__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPbase_setParams'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPbase::setParams(limix::CGPHyperParams const &)\n"
    "    limix::CGPbase::setParams(limix::CGPHyperParams const &,limix::CGPHyperParams const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPbase_getParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase const > tempshared1 ;
  std::shared_ptr< limix::CGPbase const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getParams" "', argument " "1"" of type '" "limix::CGPbase const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPbase const *)arg1)->getParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setParamArray__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setParamArray",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setParamArray" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setParamArray((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setParamArray__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = 0 ;
  limix::CGPHyperParams *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CGPbase_setParamArray",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setParamArray" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CGPbase_setParamArray" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_setParamArray" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared3 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      arg3 = const_cast< limix::CGPHyperParams * >(tempshared3.get());
    } else {
      arg3 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3)->get());
    }
  }
  {
    try {
      (arg1)->setParamArray((VectorXd const &)*arg2,(limix::CGPHyperParams const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setParamArray(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPbase_setParamArray__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_CGPbase_setParamArray__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPbase_setParamArray'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPbase::setParamArray(VectorXd const &)\n"
    "    limix::CGPbase::setParamArray(VectorXd const &,limix::CGPHyperParams const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPbase_getParamArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase const > tempshared1 ;
  std::shared_ptr< limix::CGPbase const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getParamArray",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getParamArray" "', argument " "1"" of type '" "limix::CGPbase const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CGPbase const *)arg1)->agetParamArray(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getParamBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase const > tempshared1 ;
  std::shared_ptr< limix::CGPbase const > *smartarg1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_getParamBounds",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getParamBounds" "', argument " "1"" of type '" "limix::CGPbase const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPbase_getParamBounds" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      result = ((limix::CGPbase const *)arg1)->getParamBounds(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getParamMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase const > tempshared1 ;
  std::shared_ptr< limix::CGPbase const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getParamMask",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getParamMask" "', argument " "1"" of type '" "limix::CGPbase const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPbase const *)arg1)->getParamMask();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getY",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getY" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetY(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setY",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setY" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setY((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::CovarInput *arg2 = (limix::CovarInput *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase const > tempshared1 ;
  std::shared_ptr< limix::CGPbase const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getX",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getX" "', argument " "1"" of type '" "limix::CGPbase const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CGPbase const *)arg1)->agetX(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_setX",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_setX" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getNumberSamples(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getNumberSamples",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getNumberSamples" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getNumberSamples();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getNumberDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getNumberDimension",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getNumberDimension" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getNumberDimension();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PGPCholCache result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getCache" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCache();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPCholCache > *smartresult = result ? new std::shared_ptr<  limix::CGPCholCache >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPCholCache_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getCovar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getCovar" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getLik(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PLikelihood result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getLik",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getLik" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getLik();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ALikelihood > *smartresult = result ? new std::shared_ptr<  limix::ALikelihood >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getDataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PDataTerm result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getDataTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getDataTerm" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getDataTerm();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ADataTerm > *smartresult = result ? new std::shared_ptr<  limix::ADataTerm >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_agetKEffInvYCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_agetKEffInvYCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_agetKEffInvYCache" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetKEffInvYCache(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LML__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LML",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LML" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LML__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::CGPHyperParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_LML",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LML" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPbase_LML" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_LML" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      arg2 = const_cast< limix::CGPHyperParams * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2)->get());
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML((limix::CGPHyperParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LML__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_LML",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LML" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LML(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPbase_LML__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPbase_LML__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPbase_LML__SWIG_2(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPbase_LML'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPbase::LML()\n"
    "    limix::CGPbase::LML(limix::CGPHyperParams const &)\n"
    "    limix::CGPbase::LML(VectorXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LMLgrad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLgrad" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->LMLgrad();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  limix::CGPHyperParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_LMLgrad",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLgrad" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPbase_LMLgrad" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_LMLgrad" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      arg2 = const_cast< limix::CGPHyperParams * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2)->get());
    }
  }
  {
    try {
      result = (arg1)->LMLgrad((limix::CGPHyperParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_LMLgrad",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLgrad" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      result = (arg1)->LMLgrad((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPbase_LMLgrad__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPbase_LMLgrad__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPbase_LMLgrad__SWIG_2(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPbase_LMLgrad'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPbase::LMLgrad()\n"
    "    limix::CGPbase::LMLgrad(limix::CGPHyperParams const &)\n"
    "    limix::CGPbase::LMLgrad(VectorXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPbase_aLMLgrad__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_aLMLgrad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_aLMLgrad" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_aLMLgrad__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  limix::CGPHyperParams *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_aLMLgrad",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_aLMLgrad" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj1, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CGPbase_aLMLgrad" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_aLMLgrad" "', argument " "3"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared3 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3);
      arg3 = const_cast< limix::CGPHyperParams * >(tempshared3.get());
    } else {
      arg3 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp3)->get());
    }
  }
  {
    try {
      (arg1)->aLMLgrad(arg2,(limix::CGPHyperParams const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_aLMLgrad__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  VectorXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_aLMLgrad",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_aLMLgrad" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->aLMLgrad(arg2,(VectorXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_aLMLgrad(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPbase_aLMLgrad__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPbase_aLMLgrad__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPbase_aLMLgrad__SWIG_2(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPbase_aLMLgrad'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPbase::aLMLgrad(VectorXd *)\n"
    "    limix::CGPbase::aLMLgrad(VectorXd *,limix::CGPHyperParams const &)\n"
    "    limix::CGPbase::aLMLgrad(VectorXd *,VectorXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad_covar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LMLgrad_covar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLgrad_covar" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad_lik(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LMLgrad_lik",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLgrad_lik" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_lik(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_aLMLgrad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_aLMLgrad_X",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_aLMLgrad_X" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_X(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_aLMLgrad_dataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_aLMLgrad_dataTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_aLMLgrad_dataTerm" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_dataTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLhess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::stringVec arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_LMLhess",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLhess" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj1, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__stringVec_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CGPbase_LMLhess" "', argument " "3"" of type '" "limix::stringVec""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_LMLhess" "', argument " "3"" of type '" "limix::stringVec""'");
    } else {
      arg3 = *(reinterpret_cast< std::shared_ptr<  limix::stringVec > * >(argp3)->get());
      if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr<  limix::stringVec > * >(argp3);
    }
  }
  {
    try {
      (arg1)->aLMLhess(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLhess_covar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LMLhess_covar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLhess_covar" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLhess_covar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLhess_lik(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LMLhess_lik",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLhess_lik" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLhess_lik(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLhess_covarlik(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LMLhess_covarlik",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLhess_covarlik" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLhess_covarlik(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getCov_laplace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::stringVec arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_getCov_laplace",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getCov_laplace" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj1, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__stringVec_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CGPbase_getCov_laplace" "', argument " "3"" of type '" "limix::stringVec""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_getCov_laplace" "', argument " "3"" of type '" "limix::stringVec""'");
    } else {
      arg3 = *(reinterpret_cast< std::shared_ptr<  limix::stringVec > * >(argp3)->get());
      if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr<  limix::stringVec > * >(argp3);
    }
  }
  {
    try {
      (arg1)->agetCov_laplace(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_getStd_laplace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_getStd_laplace",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_getStd_laplace" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->agetStd_laplace();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_predictMean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_predictMean",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_predictMean" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->apredictMean(arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_predictVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_predictVar",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_predictVar" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->apredictVar(arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LMLgrad_X",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLgrad_X" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->LMLgrad_X();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad_dataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = (limix::CGPbase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  std::shared_ptr< limix::CGPbase > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPbase_LMLgrad_dataTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLgrad_dataTerm" "', argument " "1"" of type '" "limix::CGPbase *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->LMLgrad_dataTerm();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLgrad_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPbase_LMLgrad_num",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLgrad_num" "', argument " "1"" of type '" "limix::CGPbase &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_LMLgrad_num" "', argument " "1"" of type '" "limix::CGPbase &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::CGPbase * >(reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1)->get());
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPbase_LMLgrad_num" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      result = (double)limix::CGPbase::LMLgrad_num(*arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPbase_LMLhess_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPbase *arg1 = 0 ;
  limix::muint_t arg2 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPbase > tempshared1 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CGPbase_LMLhess_num",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPbase_LMLhess_num" "', argument " "1"" of type '" "limix::CGPbase &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPbase_LMLhess_num" "', argument " "1"" of type '" "limix::CGPbase &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1);
      arg1 = const_cast< limix::CGPbase * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::CGPbase * >(reinterpret_cast< std::shared_ptr<  limix::CGPbase > * >(argp1)->get());
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPbase_LMLhess_num" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CGPbase_LMLhess_num" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      result = (double)limix::CGPbase::LMLhess_num(*arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPbase_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_CGPKroneckerCache_covar_r_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  limix::PCovarianceFunctionCacheOld *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  limix::PCovarianceFunctionCacheOld tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPKroneckerCache_covar_r_set",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_covar_r_set" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPKroneckerCache_covar_r_set" "', argument " "2"" of type '" "limix::PCovarianceFunctionCacheOld const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      if (argp2) tempshared2 = *reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      delete reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      arg2 = &tempshared2;
    } else {
      arg2 = (argp2) ? reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2) : &tempshared2;
    }
  }
  if (arg1) (arg1)->covar_r = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_covar_r_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_covar_r_get",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_covar_r_get" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  result = (limix::PCovarianceFunctionCacheOld *) & ((arg1)->covar_r);
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = *result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(*result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_covar_c_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  limix::PCovarianceFunctionCacheOld *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  limix::PCovarianceFunctionCacheOld tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPKroneckerCache_covar_c_set",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_covar_c_set" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPKroneckerCache_covar_c_set" "', argument " "2"" of type '" "limix::PCovarianceFunctionCacheOld const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      if (argp2) tempshared2 = *reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      delete reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      arg2 = &tempshared2;
    } else {
      arg2 = (argp2) ? reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2) : &tempshared2;
    }
  }
  if (arg1) (arg1)->covar_c = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_covar_c_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_covar_c_get",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_covar_c_get" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  result = (limix::PCovarianceFunctionCacheOld *) & ((arg1)->covar_c);
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = *result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(*result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPKroneckerCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPKroneckerCache *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CGPKroneckerCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPKroneckerCache" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::CGPKroneckerCache *)new limix::CGPKroneckerCache(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPKroneckerCache > *smartresult = result ? new std::shared_ptr<  limix::CGPKroneckerCache >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CGPKroneckerCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPKroneckerCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPKroneckerCache" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_rgetYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_rgetYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_rgetYrot" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetYrot();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_rgetSi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_rgetSi",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_rgetSi" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetSi();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_rgetYSi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_rgetYSi",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_rgetYSi" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetYSi();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_rgetKinvY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_rgetKinvY",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_rgetKinvY" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetKinvY();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_agetSi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_agetSi",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_agetSi" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetSi(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_agetYSi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_agetYSi",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_agetYSi" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetYSi(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPKroneckerCache_agetYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPKroneckerCache *arg1 = (limix::CGPKroneckerCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPKroneckerCache > tempshared1 ;
  std::shared_ptr< limix::CGPKroneckerCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPKroneckerCache_agetYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPKroneckerCache_agetYrot" "', argument " "1"" of type '" "limix::CGPKroneckerCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPKroneckerCache > * >(argp1);
      arg1 = const_cast< limix::CGPKroneckerCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetYrot(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPKroneckerCache_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CGPkronecker__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  limix::PCovarianceFunction arg2 ;
  limix::PLikelihood arg3 ;
  limix::PDataTerm arg4 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  limix::CGPkronecker *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_CGPkronecker",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPkronecker" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGPkronecker" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CGPkronecker" "', argument " "3"" of type '" "limix::PLikelihood""'"); 
    }
    if (argp3) arg3 = *(reinterpret_cast< limix::PLikelihood * >(argp3));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PLikelihood * >(argp3);
  }
  {
    int newmem = 0;
    res4 = SWIG_ConvertPtrAndOwn(obj3, &argp4, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t,  0 , &newmem);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CGPkronecker" "', argument " "4"" of type '" "limix::PDataTerm""'"); 
    }
    if (argp4) arg4 = *(reinterpret_cast< limix::PDataTerm * >(argp4));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PDataTerm * >(argp4);
  }
  {
    try {
      result = (limix::CGPkronecker *)new limix::CGPkronecker(arg1,arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPkronecker > *smartresult = result ? new std::shared_ptr<  limix::CGPkronecker >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPkronecker__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  limix::PCovarianceFunction arg2 ;
  limix::PLikelihood arg3 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  limix::CGPkronecker *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:new_CGPkronecker",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPkronecker" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGPkronecker" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CGPkronecker" "', argument " "3"" of type '" "limix::PLikelihood""'"); 
    }
    if (argp3) arg3 = *(reinterpret_cast< limix::PLikelihood * >(argp3));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PLikelihood * >(argp3);
  }
  {
    try {
      result = (limix::CGPkronecker *)new limix::CGPkronecker(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPkronecker > *smartresult = result ? new std::shared_ptr<  limix::CGPkronecker >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPkronecker__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PCovarianceFunction arg1 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CGPkronecker *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_CGPkronecker",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPkronecker" "', argument " "1"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp1);
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGPkronecker" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      result = (limix::CGPkronecker *)new limix::CGPkronecker(arg1,arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPkronecker > *smartresult = result ? new std::shared_ptr<  limix::CGPkronecker >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPkronecker(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_CGPkronecker__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_CGPkronecker__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_new_CGPkronecker__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CGPkronecker'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPkronecker::CGPkronecker(limix::PCovarianceFunction,limix::PCovarianceFunction,limix::PLikelihood,limix::PDataTerm)\n"
    "    limix::CGPkronecker::CGPkronecker(limix::PCovarianceFunction,limix::PCovarianceFunction,limix::PLikelihood)\n"
    "    limix::CGPkronecker::CGPkronecker(limix::PCovarianceFunction,limix::PCovarianceFunction)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CGPkronecker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPkronecker",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPkronecker" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_setX_r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_setX_r",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_setX_r" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX_r((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_setX_c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_setX_c",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_setX_c" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX_c((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_setY",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_setY" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setY((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_setCovar_r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_setCovar_r",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_setCovar_r" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronecker_setCovar_r" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setCovar_r(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_setCovar_c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_setCovar_c",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_setCovar_c" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronecker_setCovar_c" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setCovar_c(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_LML__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_LML",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_LML" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_LML__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  limix::CGPHyperParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_LML",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_LML" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronecker_LML" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPkronecker_LML" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      arg2 = const_cast< limix::CGPHyperParams * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2)->get());
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML((limix::CGPHyperParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_LML__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_LML",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_LML" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_LML(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPkronecker_LML__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPkronecker_LML__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPkronecker_LML__SWIG_2(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPkronecker_LML'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPkronecker::LML()\n"
    "    limix::CGPkronecker::LML(limix::CGPHyperParams const &)\n"
    "    limix::CGPkronecker::LML(VectorXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_getLik(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PLikNormalSVD result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_getLik",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_getLik" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getLik();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLikNormalSVD > *smartresult = result ? new std::shared_ptr<  limix::CLikNormalSVD >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLikNormalSVD_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_predictMean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CGPkronecker_predictMean",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_predictMean" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->apredictMean(arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_predictVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CGPkronecker_predictVar",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_predictVar" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->apredictVar(arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_LMLgrad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_LMLgrad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_LMLgrad" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->LMLgrad();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_LMLgrad_covar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  VectorXd temp2 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_LMLgrad_covar",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_LMLgrad_covar" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_bool(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CGPkronecker_LMLgrad_covar" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->aLMLgrad_covar(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_aLMLgrad_covar_r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_aLMLgrad_covar_r",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_aLMLgrad_covar_r" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covar_r(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_aLMLgrad_covar_c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_aLMLgrad_covar_c",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_aLMLgrad_covar_c" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covar_c(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_LMLgrad_lik(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_LMLgrad_lik",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_LMLgrad_lik" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_lik(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_aLMLgrad_X_r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_aLMLgrad_X_r",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_aLMLgrad_X_r" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_X_r(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_aLMLgrad_X_c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_aLMLgrad_X_c",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_aLMLgrad_X_c" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_X_c(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_aLMLgrad_dataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_aLMLgrad_dataTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_aLMLgrad_dataTerm" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_dataTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_getCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PGPKroneckerCache result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_getCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_getCache" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCache();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPKroneckerCache > *smartresult = result ? new std::shared_ptr<  limix::CGPKroneckerCache >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPKroneckerCache_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_getCovarC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker const > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_getCovarC",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_getCovarC" "', argument " "1"" of type '" "limix::CGPkronecker const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPkronecker const *)arg1)->getCovarC();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_getCovarR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker const > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_getCovarR",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_getCovarR" "', argument " "1"" of type '" "limix::CGPkronecker const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPkronecker const *)arg1)->getCovarR();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_getGplvmDimensionsC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker const > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  VectorXi result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_getGplvmDimensionsC",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_getGplvmDimensionsC" "', argument " "1"" of type '" "limix::CGPkronecker const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPkronecker const *)arg1)->getGplvmDimensionsC();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new VectorXi(static_cast< const VectorXi& >(result))), SWIGTYPE_p_VectorXi, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_getGplvmDimensionsR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker const > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  VectorXi result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronecker_getGplvmDimensionsR",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_getGplvmDimensionsR" "', argument " "1"" of type '" "limix::CGPkronecker const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPkronecker const *)arg1)->getGplvmDimensionsR();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new VectorXi(static_cast< const VectorXi& >(result))), SWIGTYPE_p_VectorXi, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_setGplvmDimensionsC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  VectorXi arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_setGplvmDimensionsC",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_setGplvmDimensionsC" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VectorXi,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronecker_setGplvmDimensionsC" "', argument " "2"" of type '" "VectorXi""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPkronecker_setGplvmDimensionsC" "', argument " "2"" of type '" "VectorXi""'");
    } else {
      VectorXi * temp = reinterpret_cast< VectorXi * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->setGplvmDimensionsC(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronecker_setGplvmDimensionsR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronecker *arg1 = (limix::CGPkronecker *) 0 ;
  VectorXi arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronecker > tempshared1 ;
  std::shared_ptr< limix::CGPkronecker > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronecker_setGplvmDimensionsR",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronecker_setGplvmDimensionsR" "', argument " "1"" of type '" "limix::CGPkronecker *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronecker > * >(argp1);
      arg1 = const_cast< limix::CGPkronecker * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VectorXi,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronecker_setGplvmDimensionsR" "', argument " "2"" of type '" "VectorXi""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPkronecker_setGplvmDimensionsR" "', argument " "2"" of type '" "VectorXi""'");
    } else {
      VectorXi * temp = reinterpret_cast< VectorXi * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->setGplvmDimensionsR(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPkronecker_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPkronecker_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_CGPkronSumCache_covarc1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  limix::PCovarianceFunctionCacheOld *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  limix::PCovarianceFunctionCacheOld tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSumCache_covarc1_set",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_covarc1_set" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronSumCache_covarc1_set" "', argument " "2"" of type '" "limix::PCovarianceFunctionCacheOld const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      if (argp2) tempshared2 = *reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      delete reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      arg2 = &tempshared2;
    } else {
      arg2 = (argp2) ? reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2) : &tempshared2;
    }
  }
  if (arg1) (arg1)->covarc1 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_covarc1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_covarc1_get",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_covarc1_get" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  result = (limix::PCovarianceFunctionCacheOld *) & ((arg1)->covarc1);
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = *result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(*result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_covarc2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  limix::PCovarianceFunctionCacheOld *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  limix::PCovarianceFunctionCacheOld tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSumCache_covarc2_set",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_covarc2_set" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronSumCache_covarc2_set" "', argument " "2"" of type '" "limix::PCovarianceFunctionCacheOld const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      if (argp2) tempshared2 = *reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      delete reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      arg2 = &tempshared2;
    } else {
      arg2 = (argp2) ? reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2) : &tempshared2;
    }
  }
  if (arg1) (arg1)->covarc2 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_covarc2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_covarc2_get",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_covarc2_get" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  result = (limix::PCovarianceFunctionCacheOld *) & ((arg1)->covarc2);
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = *result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(*result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_covarr1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  limix::PCovarianceFunctionCacheOld *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  limix::PCovarianceFunctionCacheOld tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSumCache_covarr1_set",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_covarr1_set" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronSumCache_covarr1_set" "', argument " "2"" of type '" "limix::PCovarianceFunctionCacheOld const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      if (argp2) tempshared2 = *reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      delete reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      arg2 = &tempshared2;
    } else {
      arg2 = (argp2) ? reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2) : &tempshared2;
    }
  }
  if (arg1) (arg1)->covarr1 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_covarr1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_covarr1_get",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_covarr1_get" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  result = (limix::PCovarianceFunctionCacheOld *) & ((arg1)->covarr1);
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = *result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(*result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_covarr2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  limix::PCovarianceFunctionCacheOld *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  limix::PCovarianceFunctionCacheOld tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSumCache_covarr2_set",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_covarr2_set" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPkronSumCache_covarr2_set" "', argument " "2"" of type '" "limix::PCovarianceFunctionCacheOld const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      if (argp2) tempshared2 = *reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      delete reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      arg2 = &tempshared2;
    } else {
      arg2 = (argp2) ? reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2) : &tempshared2;
    }
  }
  if (arg1) (arg1)->covarr2 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_covarr2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_covarr2_get",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_covarr2_get" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  result = (limix::PCovarianceFunctionCacheOld *) & ((arg1)->covarr2);
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = *result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(*result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPkronSumCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPkronSumCache *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CGPkronSumCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPkronSumCache" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::CGPkronSumCache *)new limix::CGPkronSumCache(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPkronSumCache > *smartresult = result ? new std::shared_ptr<  limix::CGPkronSumCache >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CGPkronSumCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPkronSumCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPkronSumCache" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetSsigma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetSsigma",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetSsigma" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetSsigma();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetScstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetScstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetScstar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetScstar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetUcstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetUcstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetUcstar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetUcstar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetLambdac(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetLambdac",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetLambdac" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetLambdac();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetSomega(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetSomega",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetSomega" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetSomega();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetSrstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetSrstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetSrstar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetSrstar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetUrstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetUrstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetUrstar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetUrstar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetLambdar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetLambdar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetLambdar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetLambdar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetD",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetD" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetD();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetYrotPart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetYrotPart",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetYrotPart" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetYrotPart();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetYrot" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetYrot();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_rgetYtilde(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_rgetYtilde",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_rgetYtilde" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetYtilde();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetSsigma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetSsigma",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetSsigma" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetSsigma(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetScstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetScstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetScstar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetScstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetUcstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetUcstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetUcstar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetUcstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetLambdac(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetLambdac",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetLambdac" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetLambdac(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetSomega(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetSomega",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetSomega" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetSomega(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetSrstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetSrstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetSrstar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetSrstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetUrstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetUrstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetUrstar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetUrstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetLambdar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetLambdar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetLambdar" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetLambdar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetD",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetD" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetD(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetYrotPart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetYrotPart",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetYrotPart" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetYrotPart(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetYrot" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetYrot(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSumCache_argetYtilde(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSumCache *arg1 = (limix::CGPkronSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPkronSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSumCache_argetYtilde",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSumCache_argetYtilde" "', argument " "1"" of type '" "limix::CGPkronSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPkronSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetYtilde(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPkronSumCache_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSumCache_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CGPkronSum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  limix::PCovarianceFunction arg2 ;
  limix::PCovarianceFunction arg3 ;
  limix::PCovarianceFunction arg4 ;
  limix::PCovarianceFunction arg5 ;
  limix::PLikelihood arg6 ;
  limix::PDataTerm arg7 ;
  MatrixXd temp1 ;
  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 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  limix::CGPkronSum *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:new_CGPkronSum",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGPkronSum" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CGPkronSum" "', argument " "3"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp3) arg3 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp3));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp3);
  }
  {
    int newmem = 0;
    res4 = SWIG_ConvertPtrAndOwn(obj3, &argp4, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CGPkronSum" "', argument " "4"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp4) arg4 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp4));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp4);
  }
  {
    int newmem = 0;
    res5 = SWIG_ConvertPtrAndOwn(obj4, &argp5, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CGPkronSum" "', argument " "5"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp5) arg5 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp5));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp5);
  }
  {
    int newmem = 0;
    res6 = SWIG_ConvertPtrAndOwn(obj5, &argp6, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t,  0 , &newmem);
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CGPkronSum" "', argument " "6"" of type '" "limix::PLikelihood""'"); 
    }
    if (argp6) arg6 = *(reinterpret_cast< limix::PLikelihood * >(argp6));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PLikelihood * >(argp6);
  }
  {
    int newmem = 0;
    res7 = SWIG_ConvertPtrAndOwn(obj6, &argp7, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t,  0 , &newmem);
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CGPkronSum" "', argument " "7"" of type '" "limix::PDataTerm""'"); 
    }
    if (argp7) arg7 = *(reinterpret_cast< limix::PDataTerm * >(argp7));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PDataTerm * >(argp7);
  }
  {
    try {
      result = (limix::CGPkronSum *)new limix::CGPkronSum((MatrixXd const &)*arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPkronSum > *smartresult = result ? new std::shared_ptr<  limix::CGPkronSum >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CGPkronSum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPkronSum",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPkronSum" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_setLambda(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSum_setLambda",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_setLambda" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPkronSum_setLambda" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLambda(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_setLambdaG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSum_setLambdaG",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_setLambdaG" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPkronSum_setLambdaG" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLambdaG(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_setLambdaN(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSum_setLambdaN",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_setLambdaN" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPkronSum_setLambdaN" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLambdaN(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getParamBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum const > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum const > *smartarg1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSum_getParamBounds",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getParamBounds" "', argument " "1"" of type '" "limix::CGPkronSum const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPkronSum_getParamBounds" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      result = ((limix::CGPkronSum const *)arg1)->getParamBounds(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getParamMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum const > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getParamMask",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getParamMask" "', argument " "1"" of type '" "limix::CGPkronSum const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPkronSum const *)arg1)->getParamMask();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getCovarr1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getCovarr1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getCovarr1" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovarr1();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getCovarr2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getCovarr2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getCovarr2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovarr2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getCovarc1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getCovarc1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getCovarc1" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovarc1();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getCovarc2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getCovarc2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getCovarc2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovarc2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetKEffInvYCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetKEffInvYCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetKEffInvYCache" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetKEffInvYCache(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_LML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_LML",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_LML" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_LMLgrad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_LMLgrad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_LMLgrad" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->LMLgrad();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_aLMLgrad_covarc1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_aLMLgrad_covarc1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_aLMLgrad_covarc1" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covarc1(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_aLMLgrad_covarc2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_aLMLgrad_covarc2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_aLMLgrad_covarc2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covarc2(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_aLMLgrad_covarr1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_aLMLgrad_covarr1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_aLMLgrad_covarr1" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covarr1(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_aLMLgrad_covarr2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_aLMLgrad_covarr2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_aLMLgrad_covarr2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covarr2(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_aLMLgrad_dataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_aLMLgrad_dataTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_aLMLgrad_dataTerm" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_dataTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_aLMLhess_c1c1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_aLMLhess_c1c1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_aLMLhess_c1c1" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLhess_c1c1(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetSc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetSc",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetSc" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetSc(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetUc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetUc",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetUc" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetUc(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetSr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetSr",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetSr" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetSr(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetUr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetUr",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetUr" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetUr(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetSsigma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetSsigma",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetSsigma" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetSsigma(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetUsigma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetUsigma",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetUsigma" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetUsigma(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetSomega(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetSomega",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetSomega" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetSomega(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetUomega(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetUomega",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetUomega" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetUomega(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetScstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetScstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetScstar" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetUcstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetUcstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetUcstar" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetUcstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetSrstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetSrstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetSrstar" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetSrstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetUrstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetUrstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetUrstar" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetUrstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetLambdac(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetLambdac",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetLambdac" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLambdac(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetLambdar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetLambdar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetLambdar" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLambdar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetYrotPart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetYrotPart",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetYrotPart" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetYrotPart(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetYrot" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetYrot(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_agetCstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_agetCstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_agetCstar" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetCstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getN(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getN",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getN" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getN();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getP",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getP" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getP();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_setDebugMode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPkronSum_setDebugMode",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_setDebugMode" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPkronSum_setDebugMode" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->setDebugMode(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtSVDcols(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtSVDcols",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtSVDcols" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtSVDcols();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtSVDrows(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtSVDrows",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtSVDrows" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtSVDrows();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLambdac(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLambdac",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLambdac" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLambdac();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLambdar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLambdar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLambdar" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLambdar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtD",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtD" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtD();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtYrotPart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtYrotPart",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtYrotPart" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtYrotPart();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtYrot" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtYrot();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtYtilde(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtYtilde",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtYtilde" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtYtilde();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC1part1a(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC1part1a",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC1part1a" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC1part1a();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC1part1b(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC1part1b",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC1part1b" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC1part1b();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC1part1c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC1part1c",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC1part1c" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC1part1c();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC1part1d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC1part1d",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC1part1d" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC1part1d();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC1part1e(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC1part1e",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC1part1e" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC1part1e();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC1part1f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC1part1f",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC1part1f" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC1part1f();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC1part2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC1part2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC1part2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC1part2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC2part1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC2part1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC2part1" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC2part1();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCC2part2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCC2part2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCC2part2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCC2part2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCR1part1a(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCR1part1a",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCR1part1a" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCR1part1a();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCR1part1b(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCR1part1b",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCR1part1b" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCR1part1b();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCR1part2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCR1part2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCR1part2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCR1part2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCR2part1a(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCR2part1a",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCR2part1a" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCR2part1a();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCR2part1b(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCR2part1b",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCR2part1b" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCR2part1b();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtCR2part2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtCR2part2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtCR2part2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtCR2part2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLMLgradCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLMLgradCovar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLMLgradCovar" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLMLgradCovar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLMLgradDataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLMLgradDataTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLMLgradDataTerm" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLMLgradDataTerm();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getIs_it(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getIs_it",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getIs_it" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getIs_it();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtGrad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtGrad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtGrad" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtGrad();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLML1a(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLML1a",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLML1a" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLML1a();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLML1b(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLML1b",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLML1b" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLML1b();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLML1c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLML1c",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLML1c" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLML1c();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLML1d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLML1d",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLML1d" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLML1d();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLML1e(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLML1e",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLML1e" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLML1e();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLML2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLML2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLML2" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLML2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLML3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLML3",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLML3" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLML3();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPkronSum_getRtLML4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPkronSum *arg1 = (limix::CGPkronSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPkronSum > tempshared1 ;
  std::shared_ptr< limix::CGPkronSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPkronSum_getRtLML4",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPkronSum_getRtLML4" "', argument " "1"" of type '" "limix::CGPkronSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPkronSum > * >(argp1);
      arg1 = const_cast< limix::CGPkronSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getRtLML4();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPkronSum_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPkronSum_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_CGPSumCache_covar1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  limix::PCovarianceFunctionCacheOld *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  limix::PCovarianceFunctionCacheOld tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSumCache_covar1_set",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_covar1_set" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPSumCache_covar1_set" "', argument " "2"" of type '" "limix::PCovarianceFunctionCacheOld const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      if (argp2) tempshared2 = *reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      delete reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      arg2 = &tempshared2;
    } else {
      arg2 = (argp2) ? reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2) : &tempshared2;
    }
  }
  if (arg1) (arg1)->covar1 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_covar1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_covar1_get",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_covar1_get" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  result = (limix::PCovarianceFunctionCacheOld *) & ((arg1)->covar1);
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = *result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(*result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_covar2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  limix::PCovarianceFunctionCacheOld *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  limix::PCovarianceFunctionCacheOld tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSumCache_covar2_set",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_covar2_set" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPSumCache_covar2_set" "', argument " "2"" of type '" "limix::PCovarianceFunctionCacheOld const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      if (argp2) tempshared2 = *reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      delete reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2);
      arg2 = &tempshared2;
    } else {
      arg2 = (argp2) ? reinterpret_cast< limix::PCovarianceFunctionCacheOld * >(argp2) : &tempshared2;
    }
  }
  if (arg1) (arg1)->covar2 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_covar2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunctionCacheOld *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_covar2_get",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_covar2_get" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  result = (limix::PCovarianceFunctionCacheOld *) & ((arg1)->covar2);
  {
    std::shared_ptr<  limix::CCovarianceFunctionCacheOld > *smartresult = *result ? new std::shared_ptr<  limix::CCovarianceFunctionCacheOld >(*result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGPSumCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPSumCache *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CGPSumCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPSumCache" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::CGPSumCache *)new limix::CGPSumCache(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPSumCache > *smartresult = result ? new std::shared_ptr<  limix::CGPSumCache >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CGPSumCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPSumCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPSumCache" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_rgetScstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_rgetScstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_rgetScstar" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetScstar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_rgetUcstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_rgetUcstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_rgetUcstar" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetUcstar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_rgetLambda(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_rgetLambda",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_rgetLambda" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetLambda();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_rgetYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_rgetYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_rgetYrot" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (MatrixXd *) &(arg1)->rgetYrot();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MatrixXd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_argetScstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_argetScstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_argetScstar" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetScstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_argetUcstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_argetUcstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_argetUcstar" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetUcstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_argetLambda(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_argetLambda",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_argetLambda" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetLambda(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSumCache_argetYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSumCache *arg1 = (limix::CGPSumCache *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSumCache > tempshared1 ;
  std::shared_ptr< limix::CGPSumCache > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSumCache_argetYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSumCache_argetYrot" "', argument " "1"" of type '" "limix::CGPSumCache *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSumCache > * >(argp1);
      arg1 = const_cast< limix::CGPSumCache * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->argetYrot(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPSumCache_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CGPSum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  limix::PCovarianceFunction arg2 ;
  limix::PCovarianceFunction arg3 ;
  limix::PLikelihood arg4 ;
  limix::PDataTerm arg5 ;
  MatrixXd temp1 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  limix::CGPSum *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_CGPSum",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGPSum" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CGPSum" "', argument " "3"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp3) arg3 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp3));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp3);
  }
  {
    int newmem = 0;
    res4 = SWIG_ConvertPtrAndOwn(obj3, &argp4, SWIGTYPE_p_std__shared_ptrT_limix__ALikelihood_t,  0 , &newmem);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CGPSum" "', argument " "4"" of type '" "limix::PLikelihood""'"); 
    }
    if (argp4) arg4 = *(reinterpret_cast< limix::PLikelihood * >(argp4));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PLikelihood * >(argp4);
  }
  {
    int newmem = 0;
    res5 = SWIG_ConvertPtrAndOwn(obj4, &argp5, SWIGTYPE_p_std__shared_ptrT_limix__ADataTerm_t,  0 , &newmem);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CGPSum" "', argument " "5"" of type '" "limix::PDataTerm""'"); 
    }
    if (argp5) arg5 = *(reinterpret_cast< limix::PDataTerm * >(argp5));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PDataTerm * >(argp5);
  }
  {
    try {
      result = (limix::CGPSum *)new limix::CGPSum((MatrixXd const &)*arg1,arg2,arg3,arg4,arg5);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPSum > *smartresult = result ? new std::shared_ptr<  limix::CGPSum >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CGPSum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPSum",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPSum" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_setX1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSum_setX1",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_setX1" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX1((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_setX2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  limix::CovarInput *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSum_setX2",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_setX2" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setX2((limix::CovarInput const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSum_setY",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_setY" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setY((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_setCovar1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSum_setCovar1",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_setCovar1" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPSum_setCovar1" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setCovar1(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_setCovar2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSum_setCovar2",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_setCovar2" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPSum_setCovar2" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setCovar2(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_getCovar1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_getCovar1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_getCovar1" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovar1();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_getCovar2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_getCovar2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_getCovar2" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovar2();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_agetScstar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_agetScstar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_agetScstar" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScstar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_agetLambda(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_agetLambda",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_agetLambda" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLambda(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_agetYrot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_agetYrot",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_agetYrot" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetYrot(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_debugCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_debugCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_debugCache" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->debugCache();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_agetCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PGPSumCache result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_agetCache",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_agetCache" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->agetCache();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPSumCache > *smartresult = result ? new std::shared_ptr<  limix::CGPSumCache >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPSumCache_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_LML__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_LML",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_LML" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_LML__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  limix::CGPHyperParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSum_LML",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_LML" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPSum_LML" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPSum_LML" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      arg2 = const_cast< limix::CGPHyperParams * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2)->get());
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML((limix::CGPHyperParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_LML__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSum_LML",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_LML" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->LML((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_LML(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPSum_LML__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPSum_LML__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPSum_LML__SWIG_2(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPSum_LML'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPSum::LML()\n"
    "    limix::CGPSum::LML(limix::CGPHyperParams const &)\n"
    "    limix::CGPSum::LML(VectorXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPSum_LMLgrad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_LMLgrad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_LMLgrad" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->LMLgrad();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_LMLgrad_covar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  VectorXd temp2 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPSum_LMLgrad_covar",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_LMLgrad_covar" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_bool(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CGPSum_LMLgrad_covar" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->aLMLgrad_covar(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_aLMLgrad_covar1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_aLMLgrad_covar1",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_aLMLgrad_covar1" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covar1(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_aLMLgrad_covar2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_aLMLgrad_covar2",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_aLMLgrad_covar2" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_covar2(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPSum_aLMLgrad_dataTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPSum *arg1 = (limix::CGPSum *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPSum > tempshared1 ;
  std::shared_ptr< limix::CGPSum > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGPSum_aLMLgrad_dataTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPSum_aLMLgrad_dataTerm" "', argument " "1"" of type '" "limix::CGPSum *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPSum > * >(argp1);
      arg1 = const_cast< limix::CGPSum * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->aLMLgrad_dataTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPSum_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPSum_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DEFAULT_TOL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "DEFAULT_TOL",SWIG_From_double(static_cast< double >(1E-4)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *_wrap_new_CGPopt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PGPbase arg1 ;
  void *argp1 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPopt *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CGPopt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGPopt" "', argument " "1"" of type '" "limix::PGPbase""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PGPbase * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PGPbase * >(argp1);
  }
  {
    try {
      result = (limix::CGPopt *)new limix::CGPopt(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPopt > *smartresult = result ? new std::shared_ptr<  limix::CGPopt >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CGPopt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGPopt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGPopt" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_gradCheck__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  limix::mfloat_t arg2 ;
  limix::mfloat_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CGPopt_gradCheck",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_gradCheck" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPopt_gradCheck" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CGPopt_gradCheck" "', argument " "3"" of type '" "limix::mfloat_t""'");
  } 
  arg3 = static_cast< limix::mfloat_t >(val3);
  {
    try {
      result = (bool)(arg1)->gradCheck(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_gradCheck__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPopt_gradCheck",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_gradCheck" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPopt_gradCheck" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      result = (bool)(arg1)->gradCheck(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_gradCheck__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_gradCheck",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_gradCheck" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)(arg1)->gradCheck();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_gradCheck(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPopt_gradCheck__SWIG_2(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_CGPopt_gradCheck__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_CGPopt_gradCheck__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPopt_gradCheck'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPopt::gradCheck(limix::mfloat_t,limix::mfloat_t)\n"
    "    limix::CGPopt::gradCheck(limix::mfloat_t)\n"
    "    limix::CGPopt::gradCheck()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPopt_opt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_opt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_opt" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)(arg1)->opt();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_getParamMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt const > tempshared1 ;
  std::shared_ptr< limix::CGPopt const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_getParamMask",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_getParamMask" "', argument " "1"" of type '" "limix::CGPopt const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPopt const *)arg1)->getParamMask();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_setParamMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  limix::CGPHyperParams arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPopt_setParamMask",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_setParamMask" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPopt_setParamMask" "', argument " "2"" of type '" "limix::CGPHyperParams""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPopt_setParamMask" "', argument " "2"" of type '" "limix::CGPHyperParams""'");
    } else {
      arg2 = *(reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp2)->get());
      if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp2);
    }
  }
  {
    try {
      (arg1)->setParamMask(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_getTolerance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt const > tempshared1 ;
  std::shared_ptr< limix::CGPopt const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_getTolerance",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_getTolerance" "', argument " "1"" of type '" "limix::CGPopt const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (double)((limix::CGPopt const *)arg1)->getTolerance();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_setTolerance__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPopt_setTolerance",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_setTolerance" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGPopt_setTolerance" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      (arg1)->setTolerance(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_setTolerance__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_setTolerance",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_setTolerance" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->setTolerance();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_setTolerance(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGPopt_setTolerance__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_CGPopt_setTolerance__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPopt_setTolerance'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPopt::setTolerance(double)\n"
    "    limix::CGPopt::setTolerance()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPopt_getNumEvaluations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_getNumEvaluations",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_getNumEvaluations" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getNumEvaluations();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_getOptBoundLower(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt const > tempshared1 ;
  std::shared_ptr< limix::CGPopt const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_getOptBoundLower",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_getOptBoundLower" "', argument " "1"" of type '" "limix::CGPopt const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPopt const *)arg1)->getOptBoundLower();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_setOptBoundLower(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  limix::CGPHyperParams arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPopt_setOptBoundLower",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_setOptBoundLower" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPopt_setOptBoundLower" "', argument " "2"" of type '" "limix::CGPHyperParams""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPopt_setOptBoundLower" "', argument " "2"" of type '" "limix::CGPHyperParams""'");
    } else {
      arg2 = *(reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp2)->get());
      if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp2);
    }
  }
  {
    try {
      (arg1)->setOptBoundLower(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_getOptBoundUpper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt const > tempshared1 ;
  std::shared_ptr< limix::CGPopt const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_getOptBoundUpper",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_getOptBoundUpper" "', argument " "1"" of type '" "limix::CGPopt const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPopt const *)arg1)->getOptBoundUpper();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_setOptBoundUpper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  limix::CGPHyperParams arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPopt_setOptBoundUpper",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_setOptBoundUpper" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPopt_setOptBoundUpper" "', argument " "2"" of type '" "limix::CGPHyperParams""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPopt_setOptBoundUpper" "', argument " "2"" of type '" "limix::CGPHyperParams""'");
    } else {
      arg2 = *(reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp2)->get());
      if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< std::shared_ptr<  limix::CGPHyperParams > * >(argp2);
    }
  }
  {
    try {
      (arg1)->setOptBoundUpper(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_getOptStartParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt const > tempshared1 ;
  std::shared_ptr< limix::CGPopt const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > > result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_getOptStartParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_getOptStartParams" "', argument " "1"" of type '" "limix::CGPopt const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CGPopt const *)arg1)->getOptStartParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > >(static_cast< const std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > >& >(result))), SWIGTYPE_p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_setOptStartParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPopt_setOptStartParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_setOptStartParams" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPopt_setOptStartParams" "', argument " "2"" of type '" "std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPopt_setOptStartParams" "', argument " "2"" of type '" "std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > * >(argp2);
  {
    try {
      (arg1)->setOptStartParams((std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_addOptStartParams__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  limix::CGPHyperParams *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::CGPHyperParams const > tempshared2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPopt_addOptStartParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_addOptStartParams" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CGPopt_addOptStartParams" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CGPopt_addOptStartParams" "', argument " "2"" of type '" "limix::CGPHyperParams const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2);
      arg2 = const_cast< limix::CGPHyperParams * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::CGPHyperParams * >(reinterpret_cast< std::shared_ptr< const limix::CGPHyperParams > * >(argp2)->get());
    }
  }
  {
    try {
      (arg1)->addOptStartParams((limix::CGPHyperParams const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_addOptStartParams__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGPopt_addOptStartParams",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_addOptStartParams" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->addOptStartParams((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGPopt_addOptStartParams(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPopt_addOptStartParams__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CGPopt_addOptStartParams__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGPopt_addOptStartParams'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGPopt::addOptStartParams(limix::CGPHyperParams const &)\n"
    "    limix::CGPopt::addOptStartParams(VectorXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CGPopt_getOptParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGPopt *arg1 = (limix::CGPopt *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGPopt > tempshared1 ;
  std::shared_ptr< limix::CGPopt > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CGPHyperParams result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGPopt_getOptParams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGPopt_getOptParams" "', argument " "1"" of type '" "limix::CGPopt *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGPopt > * >(argp1);
      arg1 = const_cast< limix::CGPopt * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getOptParams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPHyperParams > *smartresult = new std::shared_ptr<  limix::CGPHyperParams >(new limix::CGPHyperParams((limix::CGPHyperParams &)result));
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPHyperParams_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CGPopt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGPopt_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_ALMM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_ALMM",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ALMM" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getNumIntervals0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getNumIntervals0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getNumIntervals0" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::ALMM const *)arg1)->getNumIntervals0();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setNumIntervals0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setNumIntervals0",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setNumIntervals0" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setNumIntervals0" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      (arg1)->setNumIntervals0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setNumIntervalsAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setNumIntervalsAlt",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setNumIntervalsAlt" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setNumIntervalsAlt" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      (arg1)->setNumIntervalsAlt(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getNumIntervalsAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getNumIntervalsAlt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getNumIntervalsAlt" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::ALMM const *)arg1)->getNumIntervalsAlt();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getLdeltamin0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getLdeltamin0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getLdeltamin0" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)((limix::ALMM const *)arg1)->getLdeltamin0();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setLdeltamin0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setLdeltamin0",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setLdeltamin0" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setLdeltamin0" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLdeltamin0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setLdeltaminAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setLdeltaminAlt",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setLdeltaminAlt" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setLdeltaminAlt" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLdeltaminAlt(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getLdeltaminAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getLdeltaminAlt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getLdeltaminAlt" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)((limix::ALMM const *)arg1)->getLdeltaminAlt();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getLdeltamaxAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getLdeltamaxAlt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getLdeltamaxAlt" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)((limix::ALMM const *)arg1)->getLdeltamaxAlt();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setLdeltamaxAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setLdeltamaxAlt",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setLdeltamaxAlt" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setLdeltamaxAlt" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLdeltamaxAlt(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getLdeltamax0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getLdeltamax0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getLdeltamax0" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)((limix::ALMM const *)arg1)->getLdeltamax0();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setLdeltamax0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setLdeltamax0",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setLdeltamax0" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setLdeltamax0" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLdeltamax0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setLdeltaInit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setLdeltaInit",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setLdeltaInit" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setLdeltaInit" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLdeltaInit(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getLdeltaInit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getLdeltaInit",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getLdeltaInit" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)((limix::ALMM const *)arg1)->getLdeltaInit();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getNumSamples(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getNumSamples",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getNumSamples" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::ALMM const *)arg1)->getNumSamples();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getPheno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getPheno",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getPheno" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ALMM const *)arg1)->agetPheno(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getPv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getPv",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getPv" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ALMM const *)arg1)->agetPv(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getSnps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getSnps",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getSnps" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ALMM const *)arg1)->agetSnps(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getCovs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getCovs",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getCovs" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ALMM const *)arg1)->agetCovs(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setCovs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setCovs",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setCovs" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setCovs((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setPheno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setPheno",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setPheno" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setPheno((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setSNPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setSNPs",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setSNPs" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setSNPs((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_process",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_process" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->process();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getK",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getK" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ALMM const *)arg1)->agetK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setK",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setK" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setPermutation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  VectorXi *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  VectorXi temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setPermutation",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setPermutation" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg2) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setPermutation((VectorXi const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_getPermutation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  VectorXi *arg2 = (VectorXi *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  VectorXi temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getPermutation",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getPermutation" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ALMM const *)arg1)->agetPermutation(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_INT64);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mint_t* out_data = (mint_t*)array_data(out_array);
    Eigen::Map<VectorXiscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompApprox0__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  limix::mfloat_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:ALMM_setVarcompApprox0",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setVarcompApprox0" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setVarcompApprox0" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ALMM_setVarcompApprox0" "', argument " "3"" of type '" "limix::mfloat_t""'");
  } 
  arg3 = static_cast< limix::mfloat_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ALMM_setVarcompApprox0" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      (arg1)->setVarcompApprox0(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompApprox0__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  limix::mfloat_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:ALMM_setVarcompApprox0",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setVarcompApprox0" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setVarcompApprox0" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ALMM_setVarcompApprox0" "', argument " "3"" of type '" "limix::mfloat_t""'");
  } 
  arg3 = static_cast< limix::mfloat_t >(val3);
  {
    try {
      (arg1)->setVarcompApprox0(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompApprox0__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setVarcompApprox0",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setVarcompApprox0" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setVarcompApprox0" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setVarcompApprox0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompApprox0__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_setVarcompApprox0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setVarcompApprox0" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->setVarcompApprox0();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompApprox0(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_ALMM_setVarcompApprox0__SWIG_3(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ALMM_setVarcompApprox0__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_ALMM_setVarcompApprox0__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0;
          }
          if (_v) {
            return _wrap_ALMM_setVarcompApprox0__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ALMM_setVarcompApprox0'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::ALMM::setVarcompApprox0(limix::mfloat_t,limix::mfloat_t,limix::muint_t)\n"
    "    limix::ALMM::setVarcompApprox0(limix::mfloat_t,limix::mfloat_t)\n"
    "    limix::ALMM::setVarcompApprox0(limix::mfloat_t)\n"
    "    limix::ALMM::setVarcompApprox0()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompExact__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  limix::mfloat_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:ALMM_setVarcompExact",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setVarcompExact" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setVarcompExact" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ALMM_setVarcompExact" "', argument " "3"" of type '" "limix::mfloat_t""'");
  } 
  arg3 = static_cast< limix::mfloat_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ALMM_setVarcompExact" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      (arg1)->setVarcompExact(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompExact__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  limix::mfloat_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:ALMM_setVarcompExact",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setVarcompExact" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setVarcompExact" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ALMM_setVarcompExact" "', argument " "3"" of type '" "limix::mfloat_t""'");
  } 
  arg3 = static_cast< limix::mfloat_t >(val3);
  {
    try {
      (arg1)->setVarcompExact(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompExact__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setVarcompExact",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setVarcompExact" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setVarcompExact" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setVarcompExact(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompExact__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_setVarcompExact",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setVarcompExact" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->setVarcompExact();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setVarcompExact(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_ALMM_setVarcompExact__SWIG_3(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ALMM_setVarcompExact__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_ALMM_setVarcompExact__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0;
          }
          if (_v) {
            return _wrap_ALMM_setVarcompExact__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ALMM_setVarcompExact'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::ALMM::setVarcompExact(limix::mfloat_t,limix::mfloat_t,limix::muint_t)\n"
    "    limix::ALMM::setVarcompExact(limix::mfloat_t,limix::mfloat_t)\n"
    "    limix::ALMM::setVarcompExact(limix::mfloat_t)\n"
    "    limix::ALMM::setVarcompExact()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ALMM_getTestStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM const > tempshared1 ;
  std::shared_ptr< limix::ALMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ALMM_getTestStatistics",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_getTestStatistics" "', argument " "1"" of type '" "limix::ALMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (int)((limix::ALMM const *)arg1)->getTestStatistics();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ALMM_setTestStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ALMM *arg1 = (limix::ALMM *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ALMM > tempshared1 ;
  std::shared_ptr< limix::ALMM > *smartarg1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:ALMM_setTestStatistics",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ALMM_setTestStatistics" "', argument " "1"" of type '" "limix::ALMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ALMM > * >(argp1);
      arg1 = const_cast< limix::ALMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ALMM_setTestStatistics" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      (arg1)->setTestStatistics(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ALMM_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__ALMM_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CLMM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CLMM")) SWIG_fail;
  {
    try {
      result = (limix::CLMM *)new limix::CLMM();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLMM > *smartresult = result ? new std::shared_ptr<  limix::CLMM >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CLMM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CLMM",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLMM" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_process",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_process" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->process();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_updateDecomposition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_updateDecomposition",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_updateDecomposition" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->updateDecomposition();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_setKUS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  VectorXd *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  VectorXd temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:CLMM_setKUS",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_setKUS" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg4 = &temp4;
    
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setKUS((MatrixXd const &)*arg2,(MatrixXd const &)*arg3,(VectorXd const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_setK__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  VectorXd *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  VectorXd temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:CLMM_setK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_setK" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg4 = &temp4;
    
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setK((MatrixXd const &)*arg2,(MatrixXd const &)*arg3,(VectorXd const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_setK__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLMM_setK",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_setK" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_setK(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_CLMM_setK__SWIG_1(self, args);
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_VectorXd, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_CLMM_setK__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CLMM_setK'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CLMM::setK(MatrixXd const &,MatrixXd const &,VectorXd const &)\n"
    "    limix::CLMM::setK(MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CLMM_getNLL0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getNLL0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getNLL0" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetNLL0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_getNLLAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getNLLAlt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getNLLAlt" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetNLLAlt(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_getFtests(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getFtests",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getFtests" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetFtests(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_getLdeltaAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getLdeltaAlt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getLdeltaAlt" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLdeltaAlt(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_getLdelta0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getLdelta0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getLdelta0" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLdelta0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_getLSigma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getLSigma",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getLSigma" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLSigma(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_getBetaSNP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getBetaSNP",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getBetaSNP" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetBetaSNP(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_getBetaSNPste(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getBetaSNPste",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getBetaSNPste" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetBetaSNPste(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_setLdeltaInit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLMM_setLdeltaInit",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_setLdeltaInit" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CLMM_setLdeltaInit" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      (arg1)->setLdeltaInit(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_getLdeltaInit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_getLdeltaInit",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_getLdeltaInit" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getLdeltaInit();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_isCalcStes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM const > tempshared1 ;
  std::shared_ptr< limix::CLMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CLMM_isCalcStes",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_isCalcStes" "', argument " "1"" of type '" "limix::CLMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)((limix::CLMM const *)arg1)->isCalcStes();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CLMM_setCalcStes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CLMM *arg1 = (limix::CLMM *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CLMM > tempshared1 ;
  std::shared_ptr< limix::CLMM > *smartarg1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CLMM_setCalcStes",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CLMM_setCalcStes" "', argument " "1"" of type '" "limix::CLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CLMM > * >(argp1);
      arg1 = const_cast< limix::CLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CLMM_setCalcStes" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->setCalcStes(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CLMM_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CLMM_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CInteractLMM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CInteractLMM")) SWIG_fail;
  {
    try {
      result = (limix::CInteractLMM *)new limix::CInteractLMM();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CInteractLMM > *smartresult = result ? new std::shared_ptr<  limix::CInteractLMM >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CInteractLMM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CInteractLMM",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CInteractLMM" "', argument " "1"" of type '" "limix::CInteractLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_setInter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CInteractLMM_setInter",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_setInter" "', argument " "1"" of type '" "limix::CInteractLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setInter((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_getInter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM const > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CInteractLMM_getInter",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_getInter" "', argument " "1"" of type '" "limix::CInteractLMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CInteractLMM const *)arg1)->agetInter(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_setInter0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CInteractLMM_setInter0",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_setInter0" "', argument " "1"" of type '" "limix::CInteractLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setInter0((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_agetInter0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM const > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CInteractLMM_agetInter0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_agetInter0" "', argument " "1"" of type '" "limix::CInteractLMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CInteractLMM const *)arg1)->agetInter0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CInteractLMM_process",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_process" "', argument " "1"" of type '" "limix::CInteractLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->process();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_updateDecomposition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CInteractLMM_updateDecomposition",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_updateDecomposition" "', argument " "1"" of type '" "limix::CInteractLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->updateDecomposition();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_getInter0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM const > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  MatrixXd result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CInteractLMM_getInter0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_getInter0" "', argument " "1"" of type '" "limix::CInteractLMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CInteractLMM const *)arg1)->getInter0();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj((new MatrixXd(static_cast< const MatrixXd& >(result))), SWIGTYPE_p_MatrixXd, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_isRefitDelta0Pheno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM const > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CInteractLMM_isRefitDelta0Pheno",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_isRefitDelta0Pheno" "', argument " "1"" of type '" "limix::CInteractLMM const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)((limix::CInteractLMM const *)arg1)->isRefitDelta0Pheno();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CInteractLMM_setRefitDelta0Pheno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CInteractLMM *arg1 = (limix::CInteractLMM *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CInteractLMM > tempshared1 ;
  std::shared_ptr< limix::CInteractLMM > *smartarg1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CInteractLMM_setRefitDelta0Pheno",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CInteractLMM_setRefitDelta0Pheno" "', argument " "1"" of type '" "limix::CInteractLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CInteractLMM > * >(argp1);
      arg1 = const_cast< limix::CInteractLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CInteractLMM_setRefitDelta0Pheno" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->setRefitDelta0Pheno(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CInteractLMM_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CInteractLMM_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_train_associations_SingleSNP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = (MatrixXd *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  MatrixXd *arg3 = (MatrixXd *) 0 ;
  MatrixXd *arg4 = 0 ;
  MatrixXd *arg5 = 0 ;
  MatrixXd *arg6 = 0 ;
  MatrixXd *arg7 = 0 ;
  MatrixXd *arg8 = 0 ;
  int arg9 ;
  double arg10 ;
  double arg11 ;
  MatrixXd temp1 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  MatrixXd temp5 ;
  MatrixXd temp6 ;
  MatrixXd temp7 ;
  MatrixXd temp8 ;
  int val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  {
    arg1 = &temp1;
    
  }
  {
    arg2 = &temp2;
    
  }
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:train_associations_SingleSNP",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg5 = &temp5;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg5) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg6 = &temp6;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg6) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg7 = &temp7;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg7) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj4, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg8 = &temp8;
    // prepare the input array
    switch( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg8) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode9 = SWIG_AsVal_int(obj5, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "train_associations_SingleSNP" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_double(obj6, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "train_associations_SingleSNP" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  ecode11 = SWIG_AsVal_double(obj7, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "train_associations_SingleSNP" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  {
    try {
      limix::train_associations_SingleSNP(arg1,arg2,arg3,(MatrixXd const &)*arg4,(MatrixXd const &)*arg5,(MatrixXd const &)*arg6,(MatrixXd const &)*arg7,(MatrixXd const &)*arg8,arg9,arg10,arg11);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg1->rows(), arg1->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg1);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg3->rows(), arg3->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_optdelta__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  double arg6 ;
  bool arg7 ;
  MatrixXd temp1 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:optdelta",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "optdelta" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "optdelta" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "optdelta" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "optdelta" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (double)limix::optdelta((MatrixXd const &)*arg1,(MatrixXd const &)*arg2,(MatrixXd const &)*arg3,arg4,arg5,arg6,arg7);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_optdelta__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  double arg6 ;
  MatrixXd temp1 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:optdelta",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "optdelta" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "optdelta" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "optdelta" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      result = (double)limix::optdelta((MatrixXd const &)*arg1,(MatrixXd const &)*arg2,(MatrixXd const &)*arg3,arg4,arg5,arg6);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_optdelta(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[8] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 6) {
    int _v;
    {
      _v = (array_type(argv[0]) == NPY_FLOAT) || (array_type(argv[0]) == NPY_DOUBLE);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0;
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_optdelta__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    {
      _v = (array_type(argv[0]) == NPY_FLOAT) || (array_type(argv[0]) == NPY_DOUBLE);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0;
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  _v = (PyInt_Check(argv[6]) || PyLong_Check(argv[6])) ? 1 : 0;
                }
                if (_v) {
                  return _wrap_optdelta__SWIG_0(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'optdelta'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::optdelta(MatrixXd const &,MatrixXd const &,MatrixXd const &,int,double,double,bool)\n"
    "    limix::optdelta(MatrixXd const &,MatrixXd const &,MatrixXd const &,int,double,double)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_optdeltaAllY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = (MatrixXd *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  MatrixXd *arg5 = 0 ;
  MatrixXd temp1 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  MatrixXd temp5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  {
    arg1 = &temp1;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOOO:optdeltaAllY",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg5 = &temp5;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg5) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      limix::optdeltaAllY(arg1,(MatrixXd const &)*arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4,(MatrixXd const &)*arg5);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg1->rows(), arg1->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg1);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_nLLeval__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = (MatrixXd *) 0 ;
  double arg2 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  MatrixXd *arg5 = 0 ;
  bool arg6 ;
  MatrixXd temp1 ;
  double val2 ;
  int ecode2 = 0 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  MatrixXd temp5 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  double result;
  
  {
    arg1 = &temp1;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOOOO:nLLeval",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  ecode2 = SWIG_AsVal_double(obj0, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nLLeval" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg5 = &temp5;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg5) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode6 = SWIG_AsVal_bool(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "nLLeval" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (double)limix::nLLeval(arg1,arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4,(MatrixXd const &)*arg5,arg6);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg1->rows(), arg1->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg1);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_nLLeval__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = (MatrixXd *) 0 ;
  double arg2 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  MatrixXd *arg5 = 0 ;
  MatrixXd temp1 ;
  double val2 ;
  int ecode2 = 0 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  MatrixXd temp5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  double result;
  
  {
    arg1 = &temp1;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOOO:nLLeval",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  ecode2 = SWIG_AsVal_double(obj0, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nLLeval" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg5 = &temp5;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg5) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (double)limix::nLLeval(arg1,arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4,(MatrixXd const &)*arg5);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg1->rows(), arg1->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg1);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_nLLeval(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            return _wrap_nLLeval__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            {
              _v = (PyInt_Check(argv[4]) || PyLong_Check(argv[4])) ? 1 : 0;
            }
            if (_v) {
              return _wrap_nLLeval__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'nLLeval'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::nLLeval(MatrixXd *,double,MatrixXd const &,MatrixXd const &,MatrixXd const &,bool)\n"
    "    limix::nLLeval(MatrixXd *,double,MatrixXd const &,MatrixXd const &,MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_nLLevalAllY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = (MatrixXd *) 0 ;
  double arg2 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  VectorXd *arg5 = 0 ;
  MatrixXd temp1 ;
  double val2 ;
  int ecode2 = 0 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  VectorXd temp5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  {
    arg1 = &temp1;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOOO:nLLevalAllY",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  ecode2 = SWIG_AsVal_double(obj0, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nLLevalAllY" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg5 = &temp5;
    
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg5) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      limix::nLLevalAllY(arg1,arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4,(VectorXd const &)*arg5);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg1->rows(), arg1->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg1);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_nLLevalFunctor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd arg1 ;
  MatrixXd arg2 ;
  MatrixXd arg3 ;
  bool arg4 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  limix::nLLevalFunctor *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_nLLevalFunctor",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_nLLevalFunctor" "', argument " "1"" of type '" "MatrixXd const""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalFunctor" "', argument " "1"" of type '" "MatrixXd const""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_nLLevalFunctor" "', argument " "2"" of type '" "MatrixXd const""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalFunctor" "', argument " "2"" of type '" "MatrixXd const""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_nLLevalFunctor" "', argument " "3"" of type '" "MatrixXd const""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalFunctor" "', argument " "3"" of type '" "MatrixXd const""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_nLLevalFunctor" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (limix::nLLevalFunctor *)new limix::nLLevalFunctor(arg1,arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_limix__nLLevalFunctor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_nLLevalFunctor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::nLLevalFunctor *arg1 = (limix::nLLevalFunctor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_nLLevalFunctor",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__nLLevalFunctor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_nLLevalFunctor" "', argument " "1"" of type '" "limix::nLLevalFunctor *""'"); 
  }
  arg1 = reinterpret_cast< limix::nLLevalFunctor * >(argp1);
  {
    try {
      delete arg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_nLLevalFunctor___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::nLLevalFunctor *arg1 = (limix::nLLevalFunctor *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:nLLevalFunctor___call__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__nLLevalFunctor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nLLevalFunctor___call__" "', argument " "1"" of type '" "limix::nLLevalFunctor *""'"); 
  }
  arg1 = reinterpret_cast< limix::nLLevalFunctor * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nLLevalFunctor___call__" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      result = (limix::mfloat_t)(arg1)->operator ()(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *nLLevalFunctor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_limix__nLLevalFunctor, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CKroneckerLMM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CKroneckerLMM")) SWIG_fail;
  {
    try {
      result = (limix::CKroneckerLMM *)new limix::CKroneckerLMM();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CKroneckerLMM > *smartresult = result ? new std::shared_ptr<  limix::CKroneckerLMM >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CKroneckerLMM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CKroneckerLMM",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CKroneckerLMM" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_process(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_process",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_process" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->process();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_updateDecomposition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_updateDecomposition",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_updateDecomposition" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->updateDecomposition();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setK1r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setK1r",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setK1r" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK1r((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setK1c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setK1c",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setK1c" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK1c((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setK2r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setK2r",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setK2r" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK2r((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setK2c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setK2c",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setK2c" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK2c((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setPheno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setPheno",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setPheno" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setPheno((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setSNPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setSNPs",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setSNPs" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setSNPs((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setSNPcoldesign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setSNPcoldesign",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setSNPcoldesign" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setSNPcoldesign((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setSNPcoldesign0_inter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setSNPcoldesign0_inter",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setSNPcoldesign0_inter" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setSNPcoldesign0_inter((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setNumIntervals0_inter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CKroneckerLMM_setNumIntervals0_inter",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setNumIntervals0_inter" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CKroneckerLMM_setNumIntervals0_inter" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      (arg1)->setNumIntervals0_inter(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_getNumIntervals0_inter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_getNumIntervals0_inter",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_getNumIntervals0_inter" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getNumIntervals0_inter();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_getNLL0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_getNLL0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_getNLL0" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetNLL0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_agetNLL0_inter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_agetNLL0_inter",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_agetNLL0_inter" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetNLL0_inter(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_getNLLAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_getNLLAlt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_getNLLAlt" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetNLLAlt(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_getLdeltaAlt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_getLdeltaAlt",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_getLdeltaAlt" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLdeltaAlt(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_getLdelta0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_getLdelta0",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_getLdelta0" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLdelta0(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_agetLdelta0_inter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_agetLdelta0_inter",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_agetLdelta0_inter" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetLdelta0_inter(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_getBetaSNP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CKroneckerLMM_getBetaSNP",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_getBetaSNP" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetBetaSNP(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setCovariates__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  limix::MatrixXdVec *arg2 = 0 ;
  limix::MatrixXdVec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CKroneckerLMM_setCovariates",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setCovariates" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res2 = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CKroneckerLMM_setCovariates" "', argument " "2"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CKroneckerLMM_setCovariates" "', argument " "2"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CKroneckerLMM_setCovariates" "', argument " "3"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CKroneckerLMM_setCovariates" "', argument " "3"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->setCovariates((limix::MatrixXdVec const &)*arg2,(limix::MatrixXdVec const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_addCovariates(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CKroneckerLMM_addCovariates",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_addCovariates" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->addCovariates((MatrixXd const &)*arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setCovariates__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CKroneckerLMM *arg1 = (limix::CKroneckerLMM *) 0 ;
  limix::muint_t arg2 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CKroneckerLMM > tempshared1 ;
  std::shared_ptr< limix::CKroneckerLMM > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:CKroneckerLMM_setCovariates",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_setCovariates" "', argument " "1"" of type '" "limix::CKroneckerLMM *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CKroneckerLMM > * >(argp1);
      arg1 = const_cast< limix::CKroneckerLMM * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CKroneckerLMM_setCovariates" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setCovariates(arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_setCovariates(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = swig::asptr(argv[1], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< MatrixXd,std::allocator< MatrixXd > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_CKroneckerLMM_setCovariates__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          {
            _v = (array_type(argv[3]) == NPY_FLOAT) || (array_type(argv[3]) == NPY_DOUBLE);
          }
          if (_v) {
            return _wrap_CKroneckerLMM_setCovariates__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CKroneckerLMM_setCovariates'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CKroneckerLMM::setCovariates(limix::MatrixXdVec const &,limix::MatrixXdVec const &)\n"
    "    limix::CKroneckerLMM::setCovariates(limix::muint_t,MatrixXd const &,MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_nLLeval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::mfloat_t arg1 ;
  limix::MatrixXdVec *arg2 = 0 ;
  limix::MatrixXdVec *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  VectorXd *arg5 = 0 ;
  VectorXd *arg6 = 0 ;
  VectorXd *arg7 = 0 ;
  VectorXd *arg8 = 0 ;
  MatrixXd *arg9 = 0 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  int res3 = SWIG_OLDOBJ ;
  MatrixXd temp4 ;
  VectorXd temp5 ;
  VectorXd temp6 ;
  VectorXd temp7 ;
  VectorXd temp8 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:CKroneckerLMM_nLLeval",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CKroneckerLMM_nLLeval" "', argument " "1"" of type '" "limix::mfloat_t""'");
  } 
  arg1 = static_cast< limix::mfloat_t >(val1);
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res2 = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CKroneckerLMM_nLLeval" "', argument " "2"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CKroneckerLMM_nLLeval" "', argument " "2"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CKroneckerLMM_nLLeval" "', argument " "3"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CKroneckerLMM_nLLeval" "', argument " "3"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    arg3 = ptr;
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj4, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg5 = &temp5;
    
    // prepare the input array
    switch( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg5) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj5) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj5, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg6 = &temp6;
    
    // prepare the input array
    switch( array_type(obj5) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg6) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj6) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj6, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg7 = &temp7;
    
    // prepare the input array
    switch( array_type(obj6) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg7) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj7) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj7, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg8 = &temp8;
    
    // prepare the input array
    switch( array_type(obj7) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg8) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_MatrixXd,  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CKroneckerLMM_nLLeval" "', argument " "9"" of type '" "MatrixXd &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CKroneckerLMM_nLLeval" "', argument " "9"" of type '" "MatrixXd &""'"); 
  }
  arg9 = reinterpret_cast< MatrixXd * >(argp9);
  {
    try {
      result = (limix::mfloat_t)limix::CKroneckerLMM::nLLeval(arg1,(std::vector< MatrixXd,std::allocator< MatrixXd > > const &)*arg2,(std::vector< MatrixXd,std::allocator< MatrixXd > > const &)*arg3,(MatrixXd const &)*arg4,(VectorXd const &)*arg5,(VectorXd const &)*arg6,(VectorXd const &)*arg7,(VectorXd const &)*arg8,*arg9);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CKroneckerLMM_optdelta(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::mfloat_t *arg1 = 0 ;
  limix::MatrixXdVec *arg2 = 0 ;
  limix::MatrixXdVec *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  VectorXd *arg5 = 0 ;
  VectorXd *arg6 = 0 ;
  VectorXd *arg7 = 0 ;
  VectorXd *arg8 = 0 ;
  limix::mfloat_t arg9 ;
  limix::mfloat_t arg10 ;
  limix::muint_t arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  int res3 = SWIG_OLDOBJ ;
  MatrixXd temp4 ;
  VectorXd temp5 ;
  VectorXd temp6 ;
  VectorXd temp7 ;
  VectorXd temp8 ;
  double val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  unsigned long long val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOO:CKroneckerLMM_optdelta",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_double,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CKroneckerLMM_optdelta" "', argument " "1"" of type '" "limix::mfloat_t &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CKroneckerLMM_optdelta" "', argument " "1"" of type '" "limix::mfloat_t &""'"); 
  }
  arg1 = reinterpret_cast< limix::mfloat_t * >(argp1);
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res2 = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CKroneckerLMM_optdelta" "', argument " "2"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CKroneckerLMM_optdelta" "', argument " "2"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CKroneckerLMM_optdelta" "', argument " "3"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CKroneckerLMM_optdelta" "', argument " "3"" of type '" "limix::MatrixXdVec const &""'"); 
    }
    arg3 = ptr;
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj4, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg5 = &temp5;
    
    // prepare the input array
    switch( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg5) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj5) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj5, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg6 = &temp6;
    
    // prepare the input array
    switch( array_type(obj5) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg6) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj6) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj6, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg7 = &temp7;
    
    // prepare the input array
    switch( array_type(obj6) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg7) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj7) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj7, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg8 = &temp8;
    
    // prepare the input array
    switch( array_type(obj7) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg8) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  ecode9 = SWIG_AsVal_double(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "CKroneckerLMM_optdelta" "', argument " "9"" of type '" "limix::mfloat_t""'");
  } 
  arg9 = static_cast< limix::mfloat_t >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "CKroneckerLMM_optdelta" "', argument " "10"" of type '" "limix::mfloat_t""'");
  } 
  arg10 = static_cast< limix::mfloat_t >(val10);
  ecode11 = SWIG_AsVal_unsigned_SS_long_SS_long(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "CKroneckerLMM_optdelta" "', argument " "11"" of type '" "limix::muint_t""'");
  } 
  arg11 = static_cast< limix::muint_t >(val11);
  {
    try {
      result = (limix::mfloat_t)limix::CKroneckerLMM::optdelta(*arg1,(std::vector< MatrixXd,std::allocator< MatrixXd > > const &)*arg2,(std::vector< MatrixXd,std::allocator< MatrixXd > > const &)*arg3,(MatrixXd const &)*arg4,(VectorXd const &)*arg5,(VectorXd const &)*arg6,(VectorXd const &)*arg7,(VectorXd const &)*arg8,arg9,arg10,arg11);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *CKroneckerLMM_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CKroneckerLMM_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_nLLevalKronFunctor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::MatrixXdVec arg1 ;
  limix::MatrixXdVec arg2 ;
  MatrixXd arg3 ;
  MatrixXd arg4 ;
  MatrixXd arg5 ;
  MatrixXd arg6 ;
  MatrixXd arg7 ;
  MatrixXd arg8 ;
  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 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  limix::nLLevalKronFunctor *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:new_nLLevalKronFunctor",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    int res = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_nLLevalKronFunctor" "', argument " "1"" of type '" "limix::MatrixXdVec const""'"); 
    }
    arg1 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< MatrixXd,std::allocator< MatrixXd > > *ptr = (std::vector< MatrixXd,std::allocator< MatrixXd > > *)0;
    int res = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_nLLevalKronFunctor" "', argument " "2"" of type '" "limix::MatrixXdVec const""'"); 
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_nLLevalKronFunctor" "', argument " "3"" of type '" "MatrixXd const""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalKronFunctor" "', argument " "3"" of type '" "MatrixXd const""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_nLLevalKronFunctor" "', argument " "4"" of type '" "MatrixXd const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalKronFunctor" "', argument " "4"" of type '" "MatrixXd const""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_nLLevalKronFunctor" "', argument " "5"" of type '" "MatrixXd const""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalKronFunctor" "', argument " "5"" of type '" "MatrixXd const""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  {
    res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_nLLevalKronFunctor" "', argument " "6"" of type '" "MatrixXd const""'"); 
    }  
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalKronFunctor" "', argument " "6"" of type '" "MatrixXd const""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp6);
      arg6 = *temp;
      if (SWIG_IsNewObj(res6)) delete temp;
    }
  }
  {
    res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_nLLevalKronFunctor" "', argument " "7"" of type '" "MatrixXd const""'"); 
    }  
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalKronFunctor" "', argument " "7"" of type '" "MatrixXd const""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp7);
      arg7 = *temp;
      if (SWIG_IsNewObj(res7)) delete temp;
    }
  }
  {
    res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_MatrixXd,  0  | 0);
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_nLLevalKronFunctor" "', argument " "8"" of type '" "MatrixXd""'"); 
    }  
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_nLLevalKronFunctor" "', argument " "8"" of type '" "MatrixXd""'");
    } else {
      MatrixXd * temp = reinterpret_cast< MatrixXd * >(argp8);
      arg8 = *temp;
      if (SWIG_IsNewObj(res8)) delete temp;
    }
  }
  {
    try {
      result = (limix::nLLevalKronFunctor *)new limix::nLLevalKronFunctor(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_limix__nLLevalKronFunctor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_nLLevalKronFunctor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::nLLevalKronFunctor *arg1 = (limix::nLLevalKronFunctor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_nLLevalKronFunctor",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__nLLevalKronFunctor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_nLLevalKronFunctor" "', argument " "1"" of type '" "limix::nLLevalKronFunctor *""'"); 
  }
  arg1 = reinterpret_cast< limix::nLLevalKronFunctor * >(argp1);
  {
    try {
      delete arg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_nLLevalKronFunctor___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::nLLevalKronFunctor *arg1 = (limix::nLLevalKronFunctor *) 0 ;
  limix::mfloat_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:nLLevalKronFunctor___call__",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__nLLevalKronFunctor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nLLevalKronFunctor___call__" "', argument " "1"" of type '" "limix::nLLevalKronFunctor *""'"); 
  }
  arg1 = reinterpret_cast< limix::nLLevalKronFunctor * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nLLevalKronFunctor___call__" "', argument " "2"" of type '" "limix::mfloat_t""'");
  } 
  arg2 = static_cast< limix::mfloat_t >(val2);
  {
    try {
      result = (limix::mfloat_t)(arg1)->operator ()(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *nLLevalKronFunctor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_limix__nLLevalKronFunctor, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_AVarianceTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_AVarianceTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AVarianceTerm" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getName" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getInfo",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getInfo" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getInfo();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_setSampleFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  MatrixXb *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AVarianceTerm_setSampleFilter",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_setSampleFilter" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MatrixXb,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AVarianceTerm_setSampleFilter" "', argument " "2"" of type '" "MatrixXb const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AVarianceTerm_setSampleFilter" "', argument " "2"" of type '" "MatrixXb const &""'"); 
  }
  arg2 = reinterpret_cast< MatrixXb * >(argp2);
  {
    try {
      (arg1)->setSampleFilter((MatrixXb const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getNumberTraits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getNumberTraits",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getNumberTraits" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getNumberTraits();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getNumberIndividuals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm const > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getNumberIndividuals",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getNumberIndividuals" "', argument " "1"" of type '" "limix::AVarianceTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::AVarianceTerm const *)arg1)->getNumberIndividuals();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_setK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AVarianceTerm_setK",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_setK" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setK((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm const > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getK",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getK" "', argument " "1"" of type '" "limix::AVarianceTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::AVarianceTerm const *)arg1)->agetK(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getKcf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PFixedCF result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getKcf",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getKcf" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getKcf();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CFixedCF > *smartresult = result ? new std::shared_ptr<  limix::CFixedCF >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CFixedCF_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getTraitCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm const > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getTraitCovar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getTraitCovar" "', argument " "1"" of type '" "limix::AVarianceTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::AVarianceTerm const *)arg1)->getTraitCovar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_setScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AVarianceTerm_setScales",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_setScales" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setScales((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm const > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getScales" "', argument " "1"" of type '" "limix::AVarianceTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::AVarianceTerm const *)arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getNumberScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm const > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getNumberScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getNumberScales" "', argument " "1"" of type '" "limix::AVarianceTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::AVarianceTerm const *)arg1)->getNumberScales();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_initTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_initTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_initTerm" "', argument " "1"" of type '" "limix::AVarianceTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->initTerm();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AVarianceTerm_getCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AVarianceTerm *arg1 = (limix::AVarianceTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AVarianceTerm const > tempshared1 ;
  std::shared_ptr< limix::AVarianceTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AVarianceTerm_getCovariance",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AVarianceTerm_getCovariance" "', argument " "1"" of type '" "limix::AVarianceTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::AVarianceTerm > * >(argp1);
      arg1 = const_cast< limix::AVarianceTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::AVarianceTerm const *)arg1)->getCovariance();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *AVarianceTerm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CSingleTraitTerm__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CSingleTraitTerm")) SWIG_fail;
  {
    try {
      result = (limix::CSingleTraitTerm *)new limix::CSingleTraitTerm();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CSingleTraitTerm > *smartresult = result ? new std::shared_ptr<  limix::CSingleTraitTerm >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CSingleTraitTerm__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd temp1 ;
  PyObject * obj0 = 0 ;
  limix::CSingleTraitTerm *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CSingleTraitTerm",&obj0)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (limix::CSingleTraitTerm *)new limix::CSingleTraitTerm((MatrixXd const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CSingleTraitTerm > *smartresult = result ? new std::shared_ptr<  limix::CSingleTraitTerm >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CSingleTraitTerm(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CSingleTraitTerm__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      _v = (array_type(argv[0]) == NPY_FLOAT) || (array_type(argv[0]) == NPY_DOUBLE);
    }
    if (_v) {
      return _wrap_new_CSingleTraitTerm__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CSingleTraitTerm'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CSingleTraitTerm::CSingleTraitTerm()\n"
    "    limix::CSingleTraitTerm::CSingleTraitTerm(MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CSingleTraitTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CSingleTraitTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CSingleTraitTerm" "', argument " "1"" of type '" "limix::CSingleTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSingleTraitTerm_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_getName" "', argument " "1"" of type '" "limix::CSingleTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_getInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSingleTraitTerm_getInfo",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_getInfo" "', argument " "1"" of type '" "limix::CSingleTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getInfo();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_setSampleFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  MatrixXb *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CSingleTraitTerm_setSampleFilter",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_setSampleFilter" "', argument " "1"" of type '" "limix::CSingleTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MatrixXb,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CSingleTraitTerm_setSampleFilter" "', argument " "2"" of type '" "MatrixXb const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CSingleTraitTerm_setSampleFilter" "', argument " "2"" of type '" "MatrixXb const &""'"); 
  }
  arg2 = reinterpret_cast< MatrixXb * >(argp2);
  {
    try {
      (arg1)->setSampleFilter((MatrixXb const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_getNumberTraits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSingleTraitTerm_getNumberTraits",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_getNumberTraits" "', argument " "1"" of type '" "limix::CSingleTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getNumberTraits();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_getTraitCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm const > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSingleTraitTerm_getTraitCovar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_getTraitCovar" "', argument " "1"" of type '" "limix::CSingleTraitTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CSingleTraitTerm const *)arg1)->getTraitCovar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_setScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CSingleTraitTerm_setScales",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_setScales" "', argument " "1"" of type '" "limix::CSingleTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setScales((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_getScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm const > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CSingleTraitTerm_getScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_getScales" "', argument " "1"" of type '" "limix::CSingleTraitTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CSingleTraitTerm const *)arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_getNumberScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm const > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSingleTraitTerm_getNumberScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_getNumberScales" "', argument " "1"" of type '" "limix::CSingleTraitTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CSingleTraitTerm const *)arg1)->getNumberScales();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_initTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSingleTraitTerm_initTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_initTerm" "', argument " "1"" of type '" "limix::CSingleTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->initTerm();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CSingleTraitTerm_getCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CSingleTraitTerm *arg1 = (limix::CSingleTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CSingleTraitTerm const > tempshared1 ;
  std::shared_ptr< limix::CSingleTraitTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CSingleTraitTerm_getCovariance",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CSingleTraitTerm_getCovariance" "', argument " "1"" of type '" "limix::CSingleTraitTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CSingleTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CSingleTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CSingleTraitTerm const *)arg1)->getCovariance();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CSingleTraitTerm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CSingleTraitTerm_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CMultiTraitTerm__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CMultiTraitTerm *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CMultiTraitTerm",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CMultiTraitTerm" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    try {
      result = (limix::CMultiTraitTerm *)new limix::CMultiTraitTerm(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CMultiTraitTerm > *smartresult = result ? new std::shared_ptr<  limix::CMultiTraitTerm >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CMultiTraitTerm__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::muint_t arg1 ;
  limix::PCovarianceFunction arg2 ;
  MatrixXd *arg3 = 0 ;
  unsigned long long val1 ;
  int ecode1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  limix::CMultiTraitTerm *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:new_CMultiTraitTerm",&obj0,&obj1,&obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CMultiTraitTerm" "', argument " "1"" of type '" "limix::muint_t""'");
  } 
  arg1 = static_cast< limix::muint_t >(val1);
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CMultiTraitTerm" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (limix::CMultiTraitTerm *)new limix::CMultiTraitTerm(arg1,arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CMultiTraitTerm > *smartresult = result ? new std::shared_ptr<  limix::CMultiTraitTerm >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CMultiTraitTerm(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      return _wrap_new_CMultiTraitTerm__SWIG_0(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0;
    }
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_new_CMultiTraitTerm__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CMultiTraitTerm'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CMultiTraitTerm::CMultiTraitTerm(limix::muint_t)\n"
    "    limix::CMultiTraitTerm::CMultiTraitTerm(limix::muint_t,limix::PCovarianceFunction,MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CMultiTraitTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CMultiTraitTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CMultiTraitTerm" "', argument " "1"" of type '" "limix::CMultiTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CMultiTraitTerm_getName",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_getName" "', argument " "1"" of type '" "limix::CMultiTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getName();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_getInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  std::string result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CMultiTraitTerm_getInfo",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_getInfo" "', argument " "1"" of type '" "limix::CMultiTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getInfo();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_setSampleFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  MatrixXb *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm > *smartarg1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CMultiTraitTerm_setSampleFilter",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_setSampleFilter" "', argument " "1"" of type '" "limix::CMultiTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MatrixXb,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CMultiTraitTerm_setSampleFilter" "', argument " "2"" of type '" "MatrixXb const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CMultiTraitTerm_setSampleFilter" "', argument " "2"" of type '" "MatrixXb const &""'"); 
  }
  arg2 = reinterpret_cast< MatrixXb * >(argp2);
  {
    try {
      (arg1)->setSampleFilter((MatrixXb const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_getNumberTraits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CMultiTraitTerm_getNumberTraits",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_getNumberTraits" "', argument " "1"" of type '" "limix::CMultiTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getNumberTraits();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_setTraitCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  limix::PCovarianceFunction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CMultiTraitTerm_setTraitCovar",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_setTraitCovar" "', argument " "1"" of type '" "limix::CMultiTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CMultiTraitTerm_setTraitCovar" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    try {
      (arg1)->setTraitCovar(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_getTraitCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm const > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CMultiTraitTerm_getTraitCovar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_getTraitCovar" "', argument " "1"" of type '" "limix::CMultiTraitTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CMultiTraitTerm const *)arg1)->getTraitCovar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_setScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CMultiTraitTerm_setScales",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_setScales" "', argument " "1"" of type '" "limix::CMultiTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      (arg1)->setScales((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_getScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm const > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CMultiTraitTerm_getScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_getScales" "', argument " "1"" of type '" "limix::CMultiTraitTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CMultiTraitTerm const *)arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_getNumberScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm const > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CMultiTraitTerm_getNumberScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_getNumberScales" "', argument " "1"" of type '" "limix::CMultiTraitTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CMultiTraitTerm const *)arg1)->getNumberScales();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_initTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CMultiTraitTerm_initTerm",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_initTerm" "', argument " "1"" of type '" "limix::CMultiTraitTerm *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->initTerm();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMultiTraitTerm_getCovariance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMultiTraitTerm *arg1 = (limix::CMultiTraitTerm *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMultiTraitTerm const > tempshared1 ;
  std::shared_ptr< limix::CMultiTraitTerm const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PCovarianceFunction result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CMultiTraitTerm_getCovariance",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMultiTraitTerm_getCovariance" "', argument " "1"" of type '" "limix::CMultiTraitTerm const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CMultiTraitTerm > * >(argp1);
      arg1 = const_cast< limix::CMultiTraitTerm * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = ((limix::CMultiTraitTerm const *)arg1)->getCovariance();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::ACovarianceFunction > *smartresult = result ? new std::shared_ptr<  limix::ACovarianceFunction >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CMultiTraitTerm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CMultiTraitTerm_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CVarianceDecomposition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = 0 ;
  MatrixXd temp1 ;
  PyObject * obj0 = 0 ;
  limix::CVarianceDecomposition *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CVarianceDecomposition",&obj0)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg1 = &temp1;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg1) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      result = (limix::CVarianceDecomposition *)new limix::CVarianceDecomposition((MatrixXd const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CVarianceDecomposition > *smartresult = result ? new std::shared_ptr<  limix::CVarianceDecomposition >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CVarianceDecomposition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CVarianceDecomposition",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CVarianceDecomposition" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_clear",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_clear" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->clear();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_setPheno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_setPheno",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_setPheno" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setPheno((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getPheno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getPheno",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getPheno" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CVarianceDecomposition const *)arg1)->getPheno(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getNumberTraits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getNumberTraits",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getNumberTraits" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CVarianceDecomposition const *)arg1)->getNumberTraits();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getNumberIndividuals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getNumberIndividuals",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getNumberIndividuals" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CVarianceDecomposition const *)arg1)->getNumberIndividuals();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_addFixedEffTerm__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CVarianceDecomposition_addFixedEffTerm",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_addFixedEffTerm" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->addFixedEffTerm((MatrixXd const &)*arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_addFixedEffTerm__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_addFixedEffTerm",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_addFixedEffTerm" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->addFixedEffTerm((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_addFixedEffTerm(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_CVarianceDecomposition_addFixedEffTerm__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_CVarianceDecomposition_addFixedEffTerm__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CVarianceDecomposition_addFixedEffTerm'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CVarianceDecomposition::addFixedEffTerm(MatrixXd const &,MatrixXd const &)\n"
    "    limix::CVarianceDecomposition::addFixedEffTerm(MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getFixed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_getFixed",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getFixed" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CVarianceDecomposition_getFixed" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CVarianceDecomposition const *)arg1)->getFixed(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getDesign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_getDesign",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getDesign" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CVarianceDecomposition_getDesign" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      ((limix::CVarianceDecomposition const *)arg1)->getDesign(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_clearFixedEffs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_clearFixedEffs",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_clearFixedEffs" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->clearFixedEffs();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getNumberFixedEffs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getNumberFixedEffs",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getNumberFixedEffs" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CVarianceDecomposition const *)arg1)->getNumberFixedEffs();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_addTerm__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  limix::PVarianceTerm arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_addTerm",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_addTerm" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CVarianceDecomposition_addTerm" "', argument " "2"" of type '" "limix::PVarianceTerm""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PVarianceTerm * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PVarianceTerm * >(argp2);
  }
  {
    try {
      (arg1)->addTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_addTerm__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_addTerm",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_addTerm" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->addTerm((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_addTerm__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  limix::PCovarianceFunction arg2 ;
  MatrixXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CVarianceDecomposition_addTerm",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_addTerm" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CVarianceDecomposition_addTerm" "', argument " "2"" of type '" "limix::PCovarianceFunction""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PCovarianceFunction * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PCovarianceFunction * >(argp2);
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->addTerm(arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_addTerm(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CVarianceDecomposition_addTerm__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_CVarianceDecomposition_addTerm__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = (array_type(argv[2]) == NPY_FLOAT) || (array_type(argv[2]) == NPY_DOUBLE);
        }
        if (_v) {
          return _wrap_CVarianceDecomposition_addTerm__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CVarianceDecomposition_addTerm'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CVarianceDecomposition::addTerm(limix::PVarianceTerm)\n"
    "    limix::CVarianceDecomposition::addTerm(MatrixXd const &)\n"
    "    limix::CVarianceDecomposition::addTerm(limix::PCovarianceFunction,MatrixXd const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getTerm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::PVarianceTerm result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_getTerm",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getTerm" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVarianceDecomposition_getTerm" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      result = ((limix::CVarianceDecomposition const *)arg1)->getTerm(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::AVarianceTerm > *smartresult = result ? new std::shared_ptr<  limix::AVarianceTerm >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__AVarianceTerm_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_clearTerms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_clearTerms",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_clearTerms" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->clearTerms();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getNumberTerms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getNumberTerms",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getNumberTerms" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)((limix::CVarianceDecomposition const *)arg1)->getNumberTerms();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_setScales__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  VectorXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_setScales",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_setScales" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      ((limix::CVarianceDecomposition const *)arg1)->setScales((VectorXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_setScales__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  limix::muint_t arg2 ;
  VectorXd *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CVarianceDecomposition_setScales",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_setScales" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVarianceDecomposition_setScales" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<VectorXdscipy>((double*)array_data( in_array ), in_rows).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
  }
  {
    try {
      ((limix::CVarianceDecomposition const *)arg1)->setScales(arg2,(VectorXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_setScales(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VectorXd, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CVarianceDecomposition_setScales__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_VectorXd, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_CVarianceDecomposition_setScales__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CVarianceDecomposition_setScales'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CVarianceDecomposition::setScales(VectorXd const &) const\n"
    "    limix::CVarianceDecomposition::setScales(limix::muint_t,VectorXd const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getScales__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  limix::muint_t arg2 ;
  VectorXd *arg3 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition const > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition const > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  VectorXd temp3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg3 = &temp3;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_getScales",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getScales" "', argument " "1"" of type '" "limix::CVarianceDecomposition const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVarianceDecomposition_getScales" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      ((limix::CVarianceDecomposition const *)arg1)->agetScales(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg3->rows(), arg3->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg3->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg3);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getScales__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getScales" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->agetScales(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getScales(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CVarianceDecomposition_getScales__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_CVarianceDecomposition_getScales__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CVarianceDecomposition_getScales'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CVarianceDecomposition::agetScales(limix::muint_t,VectorXd *) const\n"
    "    limix::CVarianceDecomposition::agetScales(VectorXd *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getNumberScales(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getNumberScales",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getNumberScales" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->getNumberScales();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getGP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PGPbase result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getGP",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getGP" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getGP();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGPbase > *smartresult = result ? new std::shared_ptr<  limix::CGPbase >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGPbase_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getCovar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PSumCF result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getCovar",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getCovar" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getCovar();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CSumCF > *smartresult = result ? new std::shared_ptr<  limix::CSumCF >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CSumCF_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getMean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PLinearMean result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getMean",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getMean" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->getMean();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CLinearMean > *smartresult = result ? new std::shared_ptr<  limix::CLinearMean >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CLinearMean_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_initGPparams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_initGPparams",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_initGPparams" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->initGPparams();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_initGP__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CVarianceDecomposition_initGP",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_initGP" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CVarianceDecomposition_initGP" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->initGP(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_initGP__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_initGP",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_initGP" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->initGP();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_initGP(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CVarianceDecomposition_initGP__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_CVarianceDecomposition_initGP__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CVarianceDecomposition_initGP'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CVarianceDecomposition::initGP(bool)\n"
    "    limix::CVarianceDecomposition::initGP()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_initGPbase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_initGPbase",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_initGPbase" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->initGPbase();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_initGPkronSum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_initGPkronSum",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_initGPkronSum" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->initGPkronSum();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_trainGP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_trainGP",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_trainGP" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (bool)(arg1)->trainGP();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getFixedEffects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  VectorXd *arg2 = (VectorXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  VectorXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getFixedEffects",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getFixedEffects" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (arg1)->getFixedEffects(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg2->rows(), arg2->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getLML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getLML",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getLML" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getLML();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getLMLgrad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getLMLgrad",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getLMLgrad" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getLMLgrad();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getLMLgradGPbase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getLMLgradGPbase",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getLMLgradGPbase" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getLMLgradGPbase();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_getLMLgradGPkronSum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CVarianceDecomposition *arg1 = (limix::CVarianceDecomposition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CVarianceDecomposition > tempshared1 ;
  std::shared_ptr< limix::CVarianceDecomposition > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::mfloat_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CVarianceDecomposition_getLMLgradGPkronSum",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVarianceDecomposition_getLMLgradGPkronSum" "', argument " "1"" of type '" "limix::CVarianceDecomposition *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CVarianceDecomposition > * >(argp1);
      arg1 = const_cast< limix::CVarianceDecomposition * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::mfloat_t)(arg1)->getLMLgradGPkronSum();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CVarianceDecomposition_aestimateHeritability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  VectorXd *arg1 = (VectorXd *) 0 ;
  MatrixXd *arg2 = 0 ;
  MatrixXd *arg3 = 0 ;
  MatrixXd *arg4 = 0 ;
  VectorXd temp1 ;
  MatrixXd temp2 ;
  MatrixXd temp3 ;
  MatrixXd temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg1 = &temp1;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOO:CVarianceDecomposition_aestimateHeritability",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg4 = &temp4;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg4) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      limix::CVarianceDecomposition::aestimateHeritability(arg1,(MatrixXd const &)*arg2,(MatrixXd const &)*arg3,(MatrixXd const &)*arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    /*
      npy_intp dims[] = {arg1->rows(), arg1->cols()};
      PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
      if (out_array == NULL){
        PyErr_SetString(PyExc_ValueError,
                        "Unable to create the output array.");
        
        return NULL;
      }
      
      mfloat_t* out_data = (mfloat_t*)array_data(out_array);
      Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg1);
    
      resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
      */
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg1->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<VectorXdscipy>(out_data, dims[0]) = (*arg1);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CVarianceDecomposition_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CVarianceDecomposition_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_CHeaderMap_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CHeaderMap *arg1 = (limix::CHeaderMap *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CHeaderMap > tempshared1 ;
  std::shared_ptr< limix::CHeaderMap > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CHeaderMap_resize",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CHeaderMap_resize" "', argument " "1"" of type '" "limix::CHeaderMap *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CHeaderMap_resize" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CHeaderMap_setStr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CHeaderMap *arg1 = (limix::CHeaderMap *) 0 ;
  std::string arg2 ;
  limix::muint_t arg3 ;
  std::string arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CHeaderMap > tempshared1 ;
  std::shared_ptr< limix::CHeaderMap > *smartarg1 = 0 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:CHeaderMap_setStr",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CHeaderMap_setStr" "', argument " "1"" of type '" "limix::CHeaderMap *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "CHeaderMap_setStr" "', argument " "2"" of type '" "std::string""'"); 
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CHeaderMap_setStr" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string(obj3, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "CHeaderMap_setStr" "', argument " "4"" of type '" "std::string""'"); 
    }
    arg4 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      (arg1)->setStr(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CHeaderMap_copy__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CHeaderMap *arg1 = (limix::CHeaderMap *) 0 ;
  limix::muint_t arg2 ;
  limix::muint_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CHeaderMap > tempshared1 ;
  std::shared_ptr< limix::CHeaderMap > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  limix::PHeaderMap result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:CHeaderMap_copy",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CHeaderMap_copy" "', argument " "1"" of type '" "limix::CHeaderMap *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CHeaderMap_copy" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CHeaderMap_copy" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  {
    try {
      result = (arg1)->copy(arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CHeaderMap > *smartresult = result ? new std::shared_ptr<  limix::CHeaderMap >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CHeaderMap_copy__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CHeaderMap *arg1 = (limix::CHeaderMap *) 0 ;
  limix::muint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CHeaderMap > tempshared1 ;
  std::shared_ptr< limix::CHeaderMap > *smartarg1 = 0 ;
  unsigned long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::PHeaderMap result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CHeaderMap_copy",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CHeaderMap_copy" "', argument " "1"" of type '" "limix::CHeaderMap *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CHeaderMap_copy" "', argument " "2"" of type '" "limix::muint_t""'");
  } 
  arg2 = static_cast< limix::muint_t >(val2);
  {
    try {
      result = (arg1)->copy(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CHeaderMap > *smartresult = result ? new std::shared_ptr<  limix::CHeaderMap >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CHeaderMap_copy(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_CHeaderMap_copy__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        {
          _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0;
        }
        if (_v) {
          return _wrap_CHeaderMap_copy__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CHeaderMap_copy'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CHeaderMap::copy(limix::muint_t,limix::muint_t)\n"
    "    limix::CHeaderMap::copy(limix::muint_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_CHeaderMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CHeaderMap *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CHeaderMap")) SWIG_fail;
  {
    try {
      result = (limix::CHeaderMap *)new limix::CHeaderMap();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CHeaderMap > *smartresult = result ? new std::shared_ptr<  limix::CHeaderMap >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CHeaderMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CHeaderMap *arg1 = (limix::CHeaderMap *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CHeaderMap > tempshared1 ;
  std::shared_ptr< limix::CHeaderMap > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CHeaderMap",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CHeaderMap" "', argument " "1"" of type '" "limix::CHeaderMap *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CHeaderMap > * >(argp1);
      arg1 = const_cast< limix::CHeaderMap * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CHeaderMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CRMemDataFrameXd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRMemDataFrame< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CRMemDataFrameXd")) SWIG_fail;
  {
    try {
      result = (limix::CRMemDataFrame< MatrixXd > *)new limix::CRMemDataFrame< MatrixXd >();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > > *smartresult = result ? new std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CRMemDataFrameXd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRMemDataFrame< MatrixXd > *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRMemDataFrame< MatrixXd > const > tempshared1 ;
  PyObject * obj0 = 0 ;
  limix::CRMemDataFrame< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CRMemDataFrameXd",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CRMemDataFrameXd" "', argument " "1"" of type '" "limix::CRMemDataFrame< MatrixXd > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CRMemDataFrameXd" "', argument " "1"" of type '" "limix::CRMemDataFrame< MatrixXd > const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::CRMemDataFrame< MatrixXd > * >(reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1)->get());
    }
  }
  {
    try {
      result = (limix::CRMemDataFrame< MatrixXd > *)new limix::CRMemDataFrame< MatrixXd >((limix::CRMemDataFrame< MatrixXd > const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > > *smartresult = result ? new std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CRMemDataFrameXd__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  SwigValueWrapper< std::shared_ptr< MatrixXd > > arg1 ;
  limix::PHeaderMap arg2 ;
  limix::PHeaderMap arg3 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  limix::CRMemDataFrame< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:new_CRMemDataFrameXd",&obj0,&obj1,&obj2)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_MatrixXd_t,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CRMemDataFrameXd" "', argument " "1"" of type '" "std::shared_ptr< MatrixXd >""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CRMemDataFrameXd" "', argument " "1"" of type '" "std::shared_ptr< MatrixXd >""'");
    } else {
      std::shared_ptr< MatrixXd > * temp = reinterpret_cast< std::shared_ptr< MatrixXd > * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CRMemDataFrameXd" "', argument " "2"" of type '" "limix::PHeaderMap""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PHeaderMap * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PHeaderMap * >(argp2);
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CRMemDataFrameXd" "', argument " "3"" of type '" "limix::PHeaderMap""'"); 
    }
    if (argp3) arg3 = *(reinterpret_cast< limix::PHeaderMap * >(argp3));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PHeaderMap * >(argp3);
  }
  {
    try {
      result = (limix::CRMemDataFrame< MatrixXd > *)new limix::CRMemDataFrame< MatrixXd >(arg1,arg2,arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > > *smartresult = result ? new std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CRMemDataFrameXd(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CRMemDataFrameXd__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CRMemDataFrameXd__SWIG_1(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_MatrixXd_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_CRMemDataFrameXd__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CRMemDataFrameXd'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CRMemDataFrame< MatrixXd >::CRMemDataFrame()\n"
    "    limix::CRMemDataFrame< MatrixXd >::CRMemDataFrame(limix::CRMemDataFrame< MatrixXd > const &)\n"
    "    limix::CRMemDataFrame< MatrixXd >::CRMemDataFrame(std::shared_ptr< MatrixXd >,limix::PHeaderMap,limix::PHeaderMap)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CRMemDataFrameXd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRMemDataFrame< MatrixXd > *arg1 = (limix::CRMemDataFrame< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRMemDataFrame< MatrixXd > > tempshared1 ;
  std::shared_ptr< limix::CRMemDataFrame< MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CRMemDataFrameXd",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRMemDataFrameXd" "', argument " "1"" of type '" "limix::CRMemDataFrame< MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRMemDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRMemDataFrameXd_getMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRMemDataFrame< MatrixXd > *arg1 = (limix::CRMemDataFrame< MatrixXd > *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRMemDataFrame< MatrixXd > const > tempshared1 ;
  std::shared_ptr< limix::CRMemDataFrame< MatrixXd > const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CRMemDataFrameXd_getMatrix",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRMemDataFrameXd_getMatrix" "', argument " "1"" of type '" "limix::CRMemDataFrame< MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRMemDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CRMemDataFrame< MatrixXd > const *)arg1)->agetMatrix(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *CRMemDataFrameXd_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CRWMemDataFrameXd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRWMemDataFrame< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CRWMemDataFrameXd")) SWIG_fail;
  {
    try {
      result = (limix::CRWMemDataFrame< MatrixXd > *)new limix::CRWMemDataFrame< MatrixXd >();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > *smartresult = result ? new std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CRWMemDataFrameXd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRMemDataFrame< MatrixXd > *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRMemDataFrame< MatrixXd > const > tempshared1 ;
  PyObject * obj0 = 0 ;
  limix::CRWMemDataFrame< MatrixXd > *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CRWMemDataFrameXd",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CRWMemDataFrameXd" "', argument " "1"" of type '" "limix::CRMemDataFrame< MatrixXd > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CRWMemDataFrameXd" "', argument " "1"" of type '" "limix::CRMemDataFrame< MatrixXd > const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::CRMemDataFrame< MatrixXd > * >(reinterpret_cast< std::shared_ptr< const limix::CRMemDataFrame< MatrixXd > > * >(argp1)->get());
    }
  }
  {
    try {
      result = (limix::CRWMemDataFrame< MatrixXd > *)new limix::CRWMemDataFrame< MatrixXd >((limix::CRMemDataFrame< MatrixXd > const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > *smartresult = result ? new std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CRWMemDataFrameXd(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CRWMemDataFrameXd__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CRWMemDataFrameXd__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CRWMemDataFrameXd'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CRWMemDataFrame< MatrixXd >::CRWMemDataFrame()\n"
    "    limix::CRWMemDataFrame< MatrixXd >::CRWMemDataFrame(limix::CRMemDataFrame< MatrixXd > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CRWMemDataFrameXd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRWMemDataFrame< MatrixXd > *arg1 = (limix::CRWMemDataFrame< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > tempshared1 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CRWMemDataFrameXd",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRWMemDataFrameXd" "', argument " "1"" of type '" "limix::CRWMemDataFrame< MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRWMemDataFrameXd_setRowHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRWMemDataFrame< MatrixXd > *arg1 = (limix::CRWMemDataFrame< MatrixXd > *) 0 ;
  limix::PHeaderMap arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > tempshared1 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CRWMemDataFrameXd_setRowHeader",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRWMemDataFrameXd_setRowHeader" "', argument " "1"" of type '" "limix::CRWMemDataFrame< MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CRWMemDataFrameXd_setRowHeader" "', argument " "2"" of type '" "limix::PHeaderMap""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PHeaderMap * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PHeaderMap * >(argp2);
  }
  {
    try {
      (arg1)->setRowHeader(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRWMemDataFrameXd_setColHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRWMemDataFrame< MatrixXd > *arg1 = (limix::CRWMemDataFrame< MatrixXd > *) 0 ;
  limix::PHeaderMap arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > tempshared1 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CRWMemDataFrameXd_setColHeader",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRWMemDataFrameXd_setColHeader" "', argument " "1"" of type '" "limix::CRWMemDataFrame< MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CRWMemDataFrameXd_setColHeader" "', argument " "2"" of type '" "limix::PHeaderMap""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PHeaderMap * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PHeaderMap * >(argp2);
  }
  {
    try {
      (arg1)->setColHeader(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRWMemDataFrameXd_setMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRWMemDataFrame< MatrixXd > *arg1 = (limix::CRWMemDataFrame< MatrixXd > *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > tempshared1 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CRWMemDataFrameXd_setMatrix",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRWMemDataFrameXd_setMatrix" "', argument " "1"" of type '" "limix::CRWMemDataFrame< MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setMatrix((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRWMemDataFrameXd_setMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CRWMemDataFrame< MatrixXd > *arg1 = (limix::CRWMemDataFrame< MatrixXd > *) 0 ;
  SwigValueWrapper< std::shared_ptr< MatrixXd > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > tempshared1 ;
  std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > *smartarg1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CRWMemDataFrameXd_setMatrix",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRWMemDataFrameXd_setMatrix" "', argument " "1"" of type '" "limix::CRWMemDataFrame< MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CRWMemDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::CRWMemDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_MatrixXd_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CRWMemDataFrameXd_setMatrix" "', argument " "2"" of type '" "std::shared_ptr< MatrixXd >""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CRWMemDataFrameXd_setMatrix" "', argument " "2"" of type '" "std::shared_ptr< MatrixXd >""'");
    } else {
      std::shared_ptr< MatrixXd > * temp = reinterpret_cast< std::shared_ptr< MatrixXd > * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->setMatrix(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CRWMemDataFrameXd_setMatrix(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_MatrixXd_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_CRWMemDataFrameXd_setMatrix__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_CRWMemDataFrameXd_setMatrix__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CRWMemDataFrameXd_setMatrix'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CRWMemDataFrame< MatrixXd >::setMatrix(MatrixXd const &)\n"
    "    limix::CRWMemDataFrame< MatrixXd >::setMatrix(std::shared_ptr< MatrixXd >)\n");
  return 0;
}


SWIGINTERN PyObject *CRWMemDataFrameXd_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_ARDataFrameXd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ARDataFrame< MatrixXd > *arg1 = (limix::ARDataFrame< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ARDataFrame< MatrixXd > > tempshared1 ;
  std::shared_ptr< limix::ARDataFrame< MatrixXd > > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_ARDataFrameXd",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ARDataFrameXd" "', argument " "1"" of type '" "limix::ARDataFrame< MatrixXd > *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::ARDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::ARDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::ARDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::ARDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::ARDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ARDataFrameXd_getMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::ARDataFrame< MatrixXd > *arg1 = (limix::ARDataFrame< MatrixXd > *) 0 ;
  MatrixXd *arg2 = (MatrixXd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::ARDataFrame< MatrixXd > const > tempshared1 ;
  std::shared_ptr< limix::ARDataFrame< MatrixXd > const > *smartarg1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:ARDataFrameXd_getMatrix",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ARDataFrameXd_getMatrix" "', argument " "1"" of type '" "limix::ARDataFrame< MatrixXd > const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::ARDataFrame< MatrixXd > > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::ARDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::ARDataFrame< MatrixXd > * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::ARDataFrame< MatrixXd > > * >(argp1);
      arg1 = const_cast< limix::ARDataFrame< MatrixXd > * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::ARDataFrame< MatrixXd > const *)arg1)->agetMatrix(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg2->rows(), arg2->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ARDataFrameXd_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_AWDataFrameXd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AWDataFrame< MatrixXd > *arg1 = (limix::AWDataFrame< MatrixXd > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_AWDataFrameXd",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AWDataFrameXd" "', argument " "1"" of type '" "limix::AWDataFrame< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< limix::AWDataFrame< MatrixXd > * >(argp1);
  {
    try {
      delete arg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AWDataFrameXd_setRowHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AWDataFrame< MatrixXd > *arg1 = (limix::AWDataFrame< MatrixXd > *) 0 ;
  limix::PHeaderMap arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AWDataFrameXd_setRowHeader",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AWDataFrameXd_setRowHeader" "', argument " "1"" of type '" "limix::AWDataFrame< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< limix::AWDataFrame< MatrixXd > * >(argp1);
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AWDataFrameXd_setRowHeader" "', argument " "2"" of type '" "limix::PHeaderMap""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PHeaderMap * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PHeaderMap * >(argp2);
  }
  {
    try {
      (arg1)->setRowHeader(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AWDataFrameXd_setColHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AWDataFrame< MatrixXd > *arg1 = (limix::AWDataFrame< MatrixXd > *) 0 ;
  limix::PHeaderMap arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AWDataFrameXd_setColHeader",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AWDataFrameXd_setColHeader" "', argument " "1"" of type '" "limix::AWDataFrame< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< limix::AWDataFrame< MatrixXd > * >(argp1);
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AWDataFrameXd_setColHeader" "', argument " "2"" of type '" "limix::PHeaderMap""'"); 
    }
    if (argp2) arg2 = *(reinterpret_cast< limix::PHeaderMap * >(argp2));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PHeaderMap * >(argp2);
  }
  {
    try {
      (arg1)->setColHeader(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AWDataFrameXd_setMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AWDataFrame< MatrixXd > *arg1 = (limix::AWDataFrame< MatrixXd > *) 0 ;
  MatrixXd *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  MatrixXd temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AWDataFrameXd_setMatrix",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AWDataFrameXd_setMatrix" "', argument " "1"" of type '" "limix::AWDataFrame< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< limix::AWDataFrame< MatrixXd > * >(argp1);
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg2 = &temp2;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg2) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      (arg1)->setMatrix((MatrixXd const &)*arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AWDataFrameXd_setMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AWDataFrame< MatrixXd > *arg1 = (limix::AWDataFrame< MatrixXd > *) 0 ;
  SwigValueWrapper< std::shared_ptr< MatrixXd > > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AWDataFrameXd_setMatrix",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AWDataFrameXd_setMatrix" "', argument " "1"" of type '" "limix::AWDataFrame< MatrixXd > *""'"); 
  }
  arg1 = reinterpret_cast< limix::AWDataFrame< MatrixXd > * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_MatrixXd_t,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AWDataFrameXd_setMatrix" "', argument " "2"" of type '" "std::shared_ptr< MatrixXd >""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AWDataFrameXd_setMatrix" "', argument " "2"" of type '" "std::shared_ptr< MatrixXd >""'");
    } else {
      std::shared_ptr< MatrixXd > * temp = reinterpret_cast< std::shared_ptr< MatrixXd > * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      (arg1)->setMatrix(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AWDataFrameXd_setMatrix(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_MatrixXd_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_AWDataFrameXd_setMatrix__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (array_type(argv[1]) == NPY_FLOAT) || (array_type(argv[1]) == NPY_DOUBLE);
      }
      if (_v) {
        return _wrap_AWDataFrameXd_setMatrix__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'AWDataFrameXd_setMatrix'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::AWDataFrame< MatrixXd >::setMatrix(MatrixXd const &)\n"
    "    limix::AWDataFrame< MatrixXd >::setMatrix(std::shared_ptr< MatrixXd >)\n");
  return 0;
}


SWIGINTERN PyObject *AWDataFrameXd_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_limix__AWDataFrameT_MatrixXd_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_AGenotypeContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AGenotypeContainer *arg1 = (limix::AGenotypeContainer *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::AGenotypeContainer > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_AGenotypeContainer",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AGenotypeContainer" "', argument " "1"" of type '" "limix::AGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::AGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::AGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AGenotypeContainer_setSNPFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AGenotypeContainer *arg1 = (limix::AGenotypeContainer *) 0 ;
  std::string arg2 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::AGenotypeContainer > *smartarg1 = 0 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:AGenotypeContainer_setSNPFilter",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AGenotypeContainer_setSNPFilter" "', argument " "1"" of type '" "limix::AGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::AGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::AGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string(obj1, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "AGenotypeContainer_setSNPFilter" "', argument " "2"" of type '" "std::string""'"); 
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AGenotypeContainer_setSNPFilter" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AGenotypeContainer_setSNPFilter" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      (arg1)->setSNPFilter(arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AGenotypeContainer_read__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AGenotypeContainer *arg1 = (limix::AGenotypeContainer *) 0 ;
  limix::mint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::AGenotypeContainer > *smartarg1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::PGenotypeBlock result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:AGenotypeContainer_read",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AGenotypeContainer_read" "', argument " "1"" of type '" "limix::AGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::AGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::AGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AGenotypeContainer_read" "', argument " "2"" of type '" "limix::mint_t""'");
  } 
  arg2 = static_cast< limix::mint_t >(val2);
  {
    try {
      result = (arg1)->read(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AGenotypeContainer_read__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::AGenotypeContainer *arg1 = (limix::AGenotypeContainer *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::AGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::AGenotypeContainer > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PGenotypeBlock result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:AGenotypeContainer_read",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__AGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AGenotypeContainer_read" "', argument " "1"" of type '" "limix::AGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::AGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::AGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::AGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->read();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_AGenotypeContainer_read(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__AGenotypeContainer_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_AGenotypeContainer_read__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__AGenotypeContainer_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_AGenotypeContainer_read__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'AGenotypeContainer_read'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::AGenotypeContainer::read(limix::mint_t)\n"
    "    limix::AGenotypeContainer::read()\n");
  return 0;
}


SWIGINTERN PyObject *AGenotypeContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__AGenotypeContainer_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CGenotypeBlock__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGenotypeBlock *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_CGenotypeBlock")) SWIG_fail;
  {
    try {
      result = (limix::CGenotypeBlock *)new limix::CGenotypeBlock();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGenotypeBlock__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::stringVec *arg1 = 0 ;
  limix::stringVec *arg2 = 0 ;
  limix::muint_t arg3 ;
  limix::muint_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::stringVec const > tempshared1 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::shared_ptr< limix::stringVec const > tempshared2 ;
  unsigned long long val3 ;
  int ecode3 = 0 ;
  unsigned long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  limix::CGenotypeBlock *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_CGenotypeBlock",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__stringVec_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGenotypeBlock" "', argument " "1"" of type '" "limix::stringVec const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CGenotypeBlock" "', argument " "1"" of type '" "limix::stringVec const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::stringVec > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::stringVec > * >(argp1);
      arg1 = const_cast< limix::stringVec * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::stringVec * >(reinterpret_cast< std::shared_ptr< const limix::stringVec > * >(argp1)->get());
    }
  }
  {
    int newmem = 0;
    res2 = SWIG_ConvertPtrAndOwn(obj1, &argp2, SWIGTYPE_p_std__shared_ptrT_limix__stringVec_t,  0 , &newmem);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGenotypeBlock" "', argument " "2"" of type '" "limix::stringVec const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CGenotypeBlock" "', argument " "2"" of type '" "limix::stringVec const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared2 = *reinterpret_cast< std::shared_ptr< const limix::stringVec > * >(argp2);
      delete reinterpret_cast< std::shared_ptr< const limix::stringVec > * >(argp2);
      arg2 = const_cast< limix::stringVec * >(tempshared2.get());
    } else {
      arg2 = const_cast< limix::stringVec * >(reinterpret_cast< std::shared_ptr< const limix::stringVec > * >(argp2)->get());
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_long_SS_long(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CGenotypeBlock" "', argument " "3"" of type '" "limix::muint_t""'");
  } 
  arg3 = static_cast< limix::muint_t >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_long_SS_long(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CGenotypeBlock" "', argument " "4"" of type '" "limix::muint_t""'");
  } 
  arg4 = static_cast< limix::muint_t >(val4);
  {
    try {
      result = (limix::CGenotypeBlock *)new limix::CGenotypeBlock((limix::stringVec const &)*arg1,(limix::stringVec const &)*arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGenotypeBlock__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGenotypeBlock *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGenotypeBlock const > tempshared1 ;
  PyObject * obj0 = 0 ;
  limix::CGenotypeBlock *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CGenotypeBlock",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGenotypeBlock" "', argument " "1"" of type '" "limix::CGenotypeBlock const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CGenotypeBlock" "', argument " "1"" of type '" "limix::CGenotypeBlock const &""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGenotypeBlock > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >(tempshared1.get());
    } else {
      arg1 = const_cast< limix::CGenotypeBlock * >(reinterpret_cast< std::shared_ptr< const limix::CGenotypeBlock > * >(argp1)->get());
    }
  }
  {
    try {
      result = (limix::CGenotypeBlock *)new limix::CGenotypeBlock((limix::CGenotypeBlock const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGenotypeBlock__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PMatrixXd arg1 ;
  PVectorXi arg2 ;
  limix::PHeaderMap arg3 ;
  limix::PHeaderMap arg4 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  limix::CGenotypeBlock *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_CGenotypeBlock",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PMatrixXd,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CGenotypeBlock" "', argument " "1"" of type '" "PMatrixXd""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CGenotypeBlock" "', argument " "1"" of type '" "PMatrixXd""'");
    } else {
      PMatrixXd * temp = reinterpret_cast< PMatrixXd * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_PVectorXi,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CGenotypeBlock" "', argument " "2"" of type '" "PVectorXi""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CGenotypeBlock" "', argument " "2"" of type '" "PVectorXi""'");
    } else {
      PVectorXi * temp = reinterpret_cast< PVectorXi * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    int newmem = 0;
    res3 = SWIG_ConvertPtrAndOwn(obj2, &argp3, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t,  0 , &newmem);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CGenotypeBlock" "', argument " "3"" of type '" "limix::PHeaderMap""'"); 
    }
    if (argp3) arg3 = *(reinterpret_cast< limix::PHeaderMap * >(argp3));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PHeaderMap * >(argp3);
  }
  {
    int newmem = 0;
    res4 = SWIG_ConvertPtrAndOwn(obj3, &argp4, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t,  0 , &newmem);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CGenotypeBlock" "', argument " "4"" of type '" "limix::PHeaderMap""'"); 
    }
    if (argp4) arg4 = *(reinterpret_cast< limix::PHeaderMap * >(argp4));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PHeaderMap * >(argp4);
  }
  {
    try {
      result = (limix::CGenotypeBlock *)new limix::CGenotypeBlock(arg1,arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_CGenotypeBlock(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_CGenotypeBlock__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_CGenotypeBlock__SWIG_2(self, args);
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__stringVec_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__shared_ptrT_limix__stringVec_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0;
        }
        if (_v) {
          {
            _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0;
          }
          if (_v) {
            return _wrap_new_CGenotypeBlock__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_PMatrixXd, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_PVectorXi, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_std__shared_ptrT_limix__CHeaderMap_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_new_CGenotypeBlock__SWIG_3(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_CGenotypeBlock'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGenotypeBlock::CGenotypeBlock()\n"
    "    limix::CGenotypeBlock::CGenotypeBlock(limix::stringVec const &,limix::stringVec const &,limix::muint_t,limix::muint_t)\n"
    "    limix::CGenotypeBlock::CGenotypeBlock(limix::CGenotypeBlock const &)\n"
    "    limix::CGenotypeBlock::CGenotypeBlock(PMatrixXd,PVectorXi,limix::PHeaderMap,limix::PHeaderMap)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_CGenotypeBlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGenotypeBlock *arg1 = (limix::CGenotypeBlock *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGenotypeBlock > tempshared1 ;
  std::shared_ptr< limix::CGenotypeBlock > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CGenotypeBlock",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CGenotypeBlock" "', argument " "1"" of type '" "limix::CGenotypeBlock *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGenotypeBlock_numSample(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGenotypeBlock *arg1 = (limix::CGenotypeBlock *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGenotypeBlock > tempshared1 ;
  std::shared_ptr< limix::CGenotypeBlock > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGenotypeBlock_numSample",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGenotypeBlock_numSample" "', argument " "1"" of type '" "limix::CGenotypeBlock *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->numSample();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGenotypeBlock_numSNPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGenotypeBlock *arg1 = (limix::CGenotypeBlock *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGenotypeBlock > tempshared1 ;
  std::shared_ptr< limix::CGenotypeBlock > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::muint_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGenotypeBlock_numSNPs",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGenotypeBlock_numSNPs" "', argument " "1"" of type '" "limix::CGenotypeBlock *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (limix::muint_t)(arg1)->numSNPs();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGenotypeBlock_getPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGenotypeBlock *arg1 = (limix::CGenotypeBlock *) 0 ;
  VectorXi *arg2 = (VectorXi *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGenotypeBlock const > tempshared1 ;
  std::shared_ptr< limix::CGenotypeBlock const > *smartarg1 = 0 ;
  VectorXi temp2 ;
  PyObject * obj0 = 0 ;
  
  {
    arg2 = &temp2;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"O:CGenotypeBlock_getPosition",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGenotypeBlock_getPosition" "', argument " "1"" of type '" "limix::CGenotypeBlock const *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr< const limix::CGenotypeBlock > * >(argp1);
      delete reinterpret_cast< std::shared_ptr< const limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr< const limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      ((limix::CGenotypeBlock const *)arg1)->agetPosition(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    //Vector types in eigen have rows only:
    npy_intp dims[] = {
      arg2->rows()
    };
    PyObject * out_array = PyArray_SimpleNew(1, dims, NPY_INT64);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mint_t* out_data = (mint_t*)array_data(out_array);
    Eigen::Map<VectorXiscipy>(out_data, dims[0]) = (*arg2);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGenotypeBlock_read__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGenotypeBlock *arg1 = (limix::CGenotypeBlock *) 0 ;
  limix::mint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGenotypeBlock > tempshared1 ;
  std::shared_ptr< limix::CGenotypeBlock > *smartarg1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::PGenotypeBlock result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CGenotypeBlock_read",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGenotypeBlock_read" "', argument " "1"" of type '" "limix::CGenotypeBlock *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CGenotypeBlock_read" "', argument " "2"" of type '" "limix::mint_t""'");
  } 
  arg2 = static_cast< limix::mint_t >(val2);
  {
    try {
      result = (arg1)->read(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGenotypeBlock_read__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CGenotypeBlock *arg1 = (limix::CGenotypeBlock *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CGenotypeBlock > tempshared1 ;
  std::shared_ptr< limix::CGenotypeBlock > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PGenotypeBlock result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CGenotypeBlock_read",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CGenotypeBlock_read" "', argument " "1"" of type '" "limix::CGenotypeBlock *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CGenotypeBlock > * >(argp1);
      arg1 = const_cast< limix::CGenotypeBlock * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->read();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CGenotypeBlock_read(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CGenotypeBlock_read__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_CGenotypeBlock_read__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CGenotypeBlock_read'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CGenotypeBlock::read(limix::mint_t)\n"
    "    limix::CGenotypeBlock::read()\n");
  return 0;
}


SWIGINTERN PyObject *CGenotypeBlock_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CTextfileGenotypeContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  limix::CTextfileGenotypeContainer *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CTextfileGenotypeContainer",&obj0)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CTextfileGenotypeContainer" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CTextfileGenotypeContainer" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (limix::CTextfileGenotypeContainer *)new limix::CTextfileGenotypeContainer((std::string const &)*arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CTextfileGenotypeContainer > *smartresult = result ? new std::shared_ptr<  limix::CTextfileGenotypeContainer >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CTextfileGenotypeContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CTextfileGenotypeContainer *arg1 = (limix::CTextfileGenotypeContainer *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CTextfileGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::CTextfileGenotypeContainer > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CTextfileGenotypeContainer",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CTextfileGenotypeContainer" "', argument " "1"" of type '" "limix::CTextfileGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CTextfileGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CTextfileGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CTextfileGenotypeContainer_read__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CTextfileGenotypeContainer *arg1 = (limix::CTextfileGenotypeContainer *) 0 ;
  limix::mint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CTextfileGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::CTextfileGenotypeContainer > *smartarg1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::PGenotypeBlock result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CTextfileGenotypeContainer_read",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CTextfileGenotypeContainer_read" "', argument " "1"" of type '" "limix::CTextfileGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CTextfileGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CTextfileGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CTextfileGenotypeContainer_read" "', argument " "2"" of type '" "limix::mint_t""'");
  } 
  arg2 = static_cast< limix::mint_t >(val2);
  {
    try {
      result = (arg1)->read(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CTextfileGenotypeContainer_read__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CTextfileGenotypeContainer *arg1 = (limix::CTextfileGenotypeContainer *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CTextfileGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::CTextfileGenotypeContainer > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PGenotypeBlock result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CTextfileGenotypeContainer_read",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CTextfileGenotypeContainer_read" "', argument " "1"" of type '" "limix::CTextfileGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CTextfileGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CTextfileGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CTextfileGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->read();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CTextfileGenotypeContainer_read(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CTextfileGenotypeContainer_read__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_CTextfileGenotypeContainer_read__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CTextfileGenotypeContainer_read'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CTextfileGenotypeContainer::read(limix::mint_t)\n"
    "    limix::CTextfileGenotypeContainer::read()\n");
  return 0;
}


SWIGINTERN PyObject *CTextfileGenotypeContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_CMemGenotypeContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::PGenotypeBlock arg1 ;
  void *argp1 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::CMemGenotypeContainer *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_CMemGenotypeContainer",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t,  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CMemGenotypeContainer" "', argument " "1"" of type '" "limix::PGenotypeBlock""'"); 
    }
    if (argp1) arg1 = *(reinterpret_cast< limix::PGenotypeBlock * >(argp1));
    if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< limix::PGenotypeBlock * >(argp1);
  }
  {
    try {
      result = (limix::CMemGenotypeContainer *)new limix::CMemGenotypeContainer(arg1);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CMemGenotypeContainer > *smartresult = result ? new std::shared_ptr<  limix::CMemGenotypeContainer >(result SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CMemGenotypeContainer_t, SWIG_POINTER_NEW | SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_CMemGenotypeContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMemGenotypeContainer *arg1 = (limix::CMemGenotypeContainer *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMemGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::CMemGenotypeContainer > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_CMemGenotypeContainer",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMemGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CMemGenotypeContainer" "', argument " "1"" of type '" "limix::CMemGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CMemGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CMemGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      (void)arg1; delete smartarg1;
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMemGenotypeContainer_read__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMemGenotypeContainer *arg1 = (limix::CMemGenotypeContainer *) 0 ;
  limix::mint_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMemGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::CMemGenotypeContainer > *smartarg1 = 0 ;
  long long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  limix::PGenotypeBlock result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:CMemGenotypeContainer_read",&obj0,&obj1)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMemGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMemGenotypeContainer_read" "', argument " "1"" of type '" "limix::CMemGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CMemGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CMemGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CMemGenotypeContainer_read" "', argument " "2"" of type '" "limix::mint_t""'");
  } 
  arg2 = static_cast< limix::mint_t >(val2);
  {
    try {
      result = (arg1)->read(arg2);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMemGenotypeContainer_read__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  limix::CMemGenotypeContainer *arg1 = (limix::CMemGenotypeContainer *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::shared_ptr< limix::CMemGenotypeContainer > tempshared1 ;
  std::shared_ptr< limix::CMemGenotypeContainer > *smartarg1 = 0 ;
  PyObject * obj0 = 0 ;
  limix::PGenotypeBlock result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CMemGenotypeContainer_read",&obj0)) SWIG_fail;
  {
    int newmem = 0;
    res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_limix__CMemGenotypeContainer_t, 0 |  0 , &newmem);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CMemGenotypeContainer_read" "', argument " "1"" of type '" "limix::CMemGenotypeContainer *""'"); 
    }
    if (newmem & SWIG_CAST_NEW_MEMORY) {
      tempshared1 = *reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      delete reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CMemGenotypeContainer * >(tempshared1.get());
    } else {
      smartarg1 = reinterpret_cast< std::shared_ptr<  limix::CMemGenotypeContainer > * >(argp1);
      arg1 = const_cast< limix::CMemGenotypeContainer * >((smartarg1 ? smartarg1->get() : 0));
    }
  }
  {
    try {
      result = (arg1)->read();
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  {
    std::shared_ptr<  limix::CGenotypeBlock > *smartresult = result ? new std::shared_ptr<  limix::CGenotypeBlock >(result) : 0;
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_limix__CGenotypeBlock_t, SWIG_POINTER_OWN);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CMemGenotypeContainer_read(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CMemGenotypeContainer_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_CMemGenotypeContainer_read__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__shared_ptrT_limix__CMemGenotypeContainer_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_CMemGenotypeContainer_read__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CMemGenotypeContainer_read'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    limix::CMemGenotypeContainer::read(limix::mint_t)\n"
    "    limix::CMemGenotypeContainer::read()\n");
  return 0;
}


SWIGINTERN PyObject *CMemGenotypeContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__shared_ptrT_limix__CMemGenotypeContainer_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_best_split_full_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  float *arg2 = (float *) 0 ;
  float *arg3 = (float *) 0 ;
  float *arg4 = (float *) 0 ;
  float *arg5 = (float *) 0 ;
  MatrixXd *arg6 = 0 ;
  MatrixXd *arg7 = 0 ;
  MatrixXd *arg8 = 0 ;
  MatrixXd *arg9 = 0 ;
  MatrixXd *arg10 = 0 ;
  VectorXi *arg11 = 0 ;
  limix::mfloat_t arg12 ;
  float temp1 ;
  int res1 = SWIG_TMPOBJ ;
  float temp2 ;
  int res2 = SWIG_TMPOBJ ;
  float temp3 ;
  int res3 = SWIG_TMPOBJ ;
  float temp4 ;
  int res4 = SWIG_TMPOBJ ;
  float temp5 ;
  int res5 = SWIG_TMPOBJ ;
  MatrixXd temp6 ;
  MatrixXd temp7 ;
  MatrixXd temp8 ;
  MatrixXd temp9 ;
  MatrixXd temp10 ;
  VectorXi temp11 ;
  double val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  arg1 = &temp1;
  arg2 = &temp2;
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:best_split_full_model",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg6 = &temp6;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg6) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg7 = &temp7;
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg7) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg8 = &temp8;
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg8) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg9 = &temp9;
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg9) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj4, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg10 = &temp10;
    // prepare the input array
    switch( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg10) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj5) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj5, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg11 = &temp11;
    
    // prepare the input array
    switch( array_type(obj5) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg11) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode12 = SWIG_AsVal_double(obj6, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "best_split_full_model" "', argument " "12"" of type '" "limix::mfloat_t""'");
  } 
  arg12 = static_cast< limix::mfloat_t >(val12);
  {
    try {
      limix::best_split_full_model(arg1,arg2,arg3,arg4,arg5,(MatrixXd const &)*arg6,(MatrixXd const &)*arg7,(MatrixXd const &)*arg8,(MatrixXd const &)*arg9,(MatrixXd const &)*arg10,(VectorXi const &)*arg11,arg12);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res1)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg1)));
  } else {
    int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_float, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_predict_lmm_forest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  MatrixXd *arg1 = (MatrixXd *) 0 ;
  VectorXi *arg2 = 0 ;
  VectorXi *arg3 = 0 ;
  VectorXi *arg4 = 0 ;
  VectorXi *arg5 = 0 ;
  MatrixXd *arg6 = 0 ;
  MatrixXd *arg7 = 0 ;
  MatrixXd *arg8 = 0 ;
  limix::mfloat_t arg9 ;
  MatrixXd temp1 ;
  VectorXi temp2 ;
  VectorXi temp3 ;
  VectorXi temp4 ;
  VectorXi temp5 ;
  MatrixXd temp6 ;
  MatrixXd temp7 ;
  MatrixXd temp8 ;
  double val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  {
    arg1 = &temp1;
    
  }
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:predict_lmm_forest",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg2 = &temp2;
    
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg2) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj1, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg3 = &temp3;
    
    // prepare the input array
    switch( array_type(obj1) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg3) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj2, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg4 = &temp4;
    
    // prepare the input array
    switch( array_type(obj2) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg4) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      in_array = obj_to_array_contiguous_allow_conversion(obj3, NPY_INT64, &newObject);
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      in_rows = array_size(in_array, 0);
      in_cols = 1;
      
    }
    
    arg5 = &temp5;
    
    // prepare the input array
    switch( array_type(obj3) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
    case NPY_INT:
      (*arg5) = Eigen::Map<VectorXiscipy>((mint_t*)array_data( in_array ), in_rows)	.cast<mint_t>();
      break;
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj4, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg6 = &temp6;
    // prepare the input array
    switch( array_type(obj4) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg6) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj5) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj5, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg7 = &temp7;
    // prepare the input array
    switch( array_type(obj5) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg7) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj6) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj6, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg8 = &temp8;
    // prepare the input array
    switch( array_type(obj6) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg8) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  ecode9 = SWIG_AsVal_double(obj7, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "predict_lmm_forest" "', argument " "9"" of type '" "limix::mfloat_t""'");
  } 
  arg9 = static_cast< limix::mfloat_t >(val9);
  {
    try {
      limix::predict_lmm_forest(arg1,(VectorXi const &)*arg2,(VectorXi const &)*arg3,(VectorXi const &)*arg4,(VectorXi const &)*arg5,(MatrixXd const &)*arg6,(MatrixXd const &)*arg7,(MatrixXd const &)*arg8,arg9);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  {
    // prepare resulting array
    npy_intp dims[] = {
      arg1->rows(), arg1->cols()
    };
    PyObject * out_array = PyArray_SimpleNew(2, dims, NPY_DOUBLE);
    
    if (out_array == NULL){
      PyErr_SetString(PyExc_ValueError,
        "Unable to create the output array.");
      
      return NULL;
    }
    
    mfloat_t* out_data = (mfloat_t*)array_data(out_array);
    Eigen::Map<MatrixXdscipy>(out_data, dims[0], dims[1]) = (*arg1);
    
    resultobj = SWIG_Python_AppendOutput(resultobj, out_array);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_argOutSwigTest2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int *arg1 = (int *) 0 ;
  int *arg2 = (int *) 0 ;
  limix::mint_t arg3 ;
  limix::mint_t arg4 ;
  int temp1 ;
  int res1 = SWIG_TMPOBJ ;
  int temp2 ;
  int res2 = SWIG_TMPOBJ ;
  long long val3 ;
  int ecode3 = 0 ;
  long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  arg1 = &temp1;
  arg2 = &temp2;
  if (!PyArg_ParseTuple(args,(char *)"OO:argOutSwigTest2",&obj0,&obj1)) SWIG_fail;
  ecode3 = SWIG_AsVal_long_SS_long(obj0, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "argOutSwigTest2" "', argument " "3"" of type '" "limix::mint_t""'");
  } 
  arg3 = static_cast< limix::mint_t >(val3);
  ecode4 = SWIG_AsVal_long_SS_long(obj1, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "argOutSwigTest2" "', argument " "4"" of type '" "limix::mint_t""'");
  } 
  arg4 = static_cast< limix::mint_t >(val4);
  {
    try {
      limix::argOutSwigTest2(arg1,arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res1)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1)));
  } else {
    int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags));
  }
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_argOutSwigTest3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  float *arg2 = (float *) 0 ;
  limix::mint_t arg3 ;
  limix::mint_t arg4 ;
  float temp1 ;
  int res1 = SWIG_TMPOBJ ;
  float temp2 ;
  int res2 = SWIG_TMPOBJ ;
  long long val3 ;
  int ecode3 = 0 ;
  long long val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  arg1 = &temp1;
  arg2 = &temp2;
  if (!PyArg_ParseTuple(args,(char *)"OO:argOutSwigTest3",&obj0,&obj1)) SWIG_fail;
  ecode3 = SWIG_AsVal_long_SS_long(obj0, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "argOutSwigTest3" "', argument " "3"" of type '" "limix::mint_t""'");
  } 
  arg3 = static_cast< limix::mint_t >(val3);
  ecode4 = SWIG_AsVal_long_SS_long(obj1, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "argOutSwigTest3" "', argument " "4"" of type '" "limix::mint_t""'");
  } 
  arg4 = static_cast< limix::mint_t >(val4);
  {
    try {
      limix::argOutSwigTest3(arg1,arg2,arg3,arg4);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res1)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg1)));
  } else {
    int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_float, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_argOutSwigTest4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int *arg1 = (int *) 0 ;
  int *arg2 = (int *) 0 ;
  MatrixXd *arg3 = 0 ;
  int temp1 ;
  int res1 = SWIG_TMPOBJ ;
  int temp2 ;
  int res2 = SWIG_TMPOBJ ;
  MatrixXd temp3 ;
  PyObject * obj0 = 0 ;
  
  arg1 = &temp1;
  arg2 = &temp2;
  if (!PyArg_ParseTuple(args,(char *)"O:argOutSwigTest4",&obj0)) SWIG_fail;
  {
    // create array from input
    int newObject=0;
    PyArrayObject * in_array;
    
    switch ( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      in_array = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, &newObject);
      break;
      
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      
      return NULL;
    }
    
    if( in_array == NULL ){
      PyErr_SetString(PyExc_ValueError,
        "array could not be created");
      
      return NULL;
    }
    
    // require one or two dimensions
    int dims[] = {
      1, 2
    };
    require_dimensions_n(in_array, dims, 2);
    
    // get the dimensions
    int in_rows;
    int in_cols;
    if(array_numdims(in_array) == 2){
      in_rows = array_size(in_array, 0);
      in_cols = array_size(in_array, 1);
      
    }else{
      //if vector: create a column vector explicitly:
      in_rows = array_size(in_array, 0);
      in_cols = 1;
    }
    
    arg3 = &temp3;
    // prepare the input array
    switch( array_type(obj0) ) {
    case NPY_LONG:
    case NPY_DOUBLE:
      (*arg3) = Eigen::Map<MatrixXdscipy>((double*)array_data( in_array ), in_rows, in_cols).cast<mfloat_t>();
      break;
    case NPY_INT:
    case NPY_FLOAT:
      
    default:
      PyErr_SetString(PyExc_ValueError,
        "array must be of type int, float, long or double");
      return NULL;
    }
    //refernce counter if we craeted a copy?
    if(newObject)
    {
      Py_DECREF(in_array);
    }
    
  }
  {
    try {
      limix::argOutSwigTest4(arg1,arg2,(MatrixXd const &)*arg3);
    } catch (limix::CLimixException& e) {
      std::string s("LIMIX error: "), s2(e.what());
      s = s + s2;
      SWIG_exception(SWIG_RuntimeError, s.c_str());
      return NULL;
    } catch (...) {
      SWIG_exception(SWIG_RuntimeError,"Unknown exception");
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res1)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1)));
  } else {
    int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags));
  }
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


static PyMethodDef SwigMethods[] = {
	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
	 { (char *)"SHARED_PTR_DISOWN_swigconstant", SHARED_PTR_DISOWN_swigconstant, METH_VARARGS, NULL},
	 { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, (char *)"\n"
		"delete_SwigPyIterator(SwigPyIterator self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, (char *)"\n"
		"SwigPyIterator_value(SwigPyIterator self) -> PyObject *\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator const *\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, (char *)"\n"
		"incr(size_t n=1) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"n: size_t\n"
		"\n"
		"SwigPyIterator_incr(SwigPyIterator self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, (char *)"\n"
		"decr(size_t n=1) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"n: size_t\n"
		"\n"
		"SwigPyIterator_decr(SwigPyIterator self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, (char *)"\n"
		"SwigPyIterator_distance(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator const *\n"
		"x: swig::SwigPyIterator const &\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, (char *)"\n"
		"SwigPyIterator_equal(SwigPyIterator self, SwigPyIterator x) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator const *\n"
		"x: swig::SwigPyIterator const &\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, (char *)"\n"
		"SwigPyIterator_copy(SwigPyIterator self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator const *\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, (char *)"\n"
		"SwigPyIterator_next(SwigPyIterator self) -> PyObject *\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, (char *)"\n"
		"SwigPyIterator___next__(SwigPyIterator self) -> PyObject *\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, (char *)"\n"
		"SwigPyIterator_previous(SwigPyIterator self) -> PyObject *\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, (char *)"\n"
		"SwigPyIterator_advance(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"n: ptrdiff_t\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, (char *)"\n"
		"SwigPyIterator___eq__(SwigPyIterator self, SwigPyIterator x) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator const *\n"
		"x: swig::SwigPyIterator const &\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, (char *)"\n"
		"SwigPyIterator___ne__(SwigPyIterator self, SwigPyIterator x) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator const *\n"
		"x: swig::SwigPyIterator const &\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, (char *)"\n"
		"SwigPyIterator___iadd__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"n: ptrdiff_t\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, (char *)"\n"
		"SwigPyIterator___isub__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator *\n"
		"n: ptrdiff_t\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, (char *)"\n"
		"SwigPyIterator___add__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator const *\n"
		"n: ptrdiff_t\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, (char *)"\n"
		"__sub__(ptrdiff_t n) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"n: ptrdiff_t\n"
		"\n"
		"SwigPyIterator___sub__(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: swig::SwigPyIterator const *\n"
		"x: swig::SwigPyIterator const &\n"
		"\n"
		""},
	 { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL},
	 { (char *)"MatrixXdVec_iterator", _wrap_MatrixXdVec_iterator, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_iterator(MatrixXdVec self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___nonzero__", _wrap_MatrixXdVec___nonzero__, METH_VARARGS, (char *)"\n"
		"MatrixXdVec___nonzero__(MatrixXdVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___bool__", _wrap_MatrixXdVec___bool__, METH_VARARGS, (char *)"\n"
		"MatrixXdVec___bool__(MatrixXdVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___len__", _wrap_MatrixXdVec___len__, METH_VARARGS, (char *)"\n"
		"MatrixXdVec___len__(MatrixXdVec self) -> std::vector< MatrixXd >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___getslice__", _wrap_MatrixXdVec___getslice__, METH_VARARGS, (char *)"\n"
		"MatrixXdVec___getslice__(MatrixXdVec self, std::vector< MatrixXd >::difference_type i, std::vector< MatrixXd >::difference_type j) -> MatrixXdVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"i: std::vector< MatrixXd >::difference_type\n"
		"j: std::vector< MatrixXd >::difference_type\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___setslice__", _wrap_MatrixXdVec___setslice__, METH_VARARGS, (char *)"\n"
		"__setslice__(std::vector< MatrixXd >::difference_type i, std::vector< MatrixXd >::difference_type j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i: std::vector< MatrixXd >::difference_type\n"
		"j: std::vector< MatrixXd >::difference_type\n"
		"\n"
		"MatrixXdVec___setslice__(MatrixXdVec self, std::vector< MatrixXd >::difference_type i, std::vector< MatrixXd >::difference_type j, MatrixXdVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"i: std::vector< MatrixXd >::difference_type\n"
		"j: std::vector< MatrixXd >::difference_type\n"
		"v: std::vector< MatrixXd,std::allocator< MatrixXd > > const &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___delslice__", _wrap_MatrixXdVec___delslice__, METH_VARARGS, (char *)"\n"
		"MatrixXdVec___delslice__(MatrixXdVec self, std::vector< MatrixXd >::difference_type i, std::vector< MatrixXd >::difference_type j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"i: std::vector< MatrixXd >::difference_type\n"
		"j: std::vector< MatrixXd >::difference_type\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___delitem__", _wrap_MatrixXdVec___delitem__, METH_VARARGS, (char *)"\n"
		"__delitem__(std::vector< MatrixXd >::difference_type i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i: std::vector< MatrixXd >::difference_type\n"
		"\n"
		"MatrixXdVec___delitem__(MatrixXdVec self, PySliceObject * slice)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"slice: PySliceObject *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___getitem__", _wrap_MatrixXdVec___getitem__, METH_VARARGS, (char *)"\n"
		"__getitem__(PySliceObject * slice) -> MatrixXdVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"\n"
		"MatrixXdVec___getitem__(MatrixXdVec self, std::vector< MatrixXd >::difference_type i) -> std::vector< MatrixXd >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"i: std::vector< MatrixXd >::difference_type\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec___setitem__", _wrap_MatrixXdVec___setitem__, METH_VARARGS, (char *)"\n"
		"__setitem__(PySliceObject * slice, MatrixXdVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"v: std::vector< MatrixXd,std::allocator< MatrixXd > > const &\n"
		"\n"
		"__setitem__(PySliceObject * slice)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"\n"
		"MatrixXdVec___setitem__(MatrixXdVec self, std::vector< MatrixXd >::difference_type i, std::vector< MatrixXd >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"i: std::vector< MatrixXd >::difference_type\n"
		"x: std::vector< MatrixXd >::value_type const &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_pop", _wrap_MatrixXdVec_pop, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_pop(MatrixXdVec self) -> std::vector< MatrixXd >::value_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_append", _wrap_MatrixXdVec_append, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_append(MatrixXdVec self, std::vector< MatrixXd >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"x: std::vector< MatrixXd >::value_type const &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_empty", _wrap_MatrixXdVec_empty, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_empty(MatrixXdVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_size", _wrap_MatrixXdVec_size, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_size(MatrixXdVec self) -> std::vector< MatrixXd >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_swap", _wrap_MatrixXdVec_swap, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_swap(MatrixXdVec self, MatrixXdVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"v: std::vector< MatrixXd > &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_begin", _wrap_MatrixXdVec_begin, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_begin(MatrixXdVec self) -> std::vector< MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_end", _wrap_MatrixXdVec_end, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_end(MatrixXdVec self) -> std::vector< MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_rbegin", _wrap_MatrixXdVec_rbegin, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_rbegin(MatrixXdVec self) -> std::vector< MatrixXd >::reverse_iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_rend", _wrap_MatrixXdVec_rend, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_rend(MatrixXdVec self) -> std::vector< MatrixXd >::reverse_iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_clear", _wrap_MatrixXdVec_clear, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_clear(MatrixXdVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_get_allocator", _wrap_MatrixXdVec_get_allocator, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_get_allocator(MatrixXdVec self) -> std::vector< MatrixXd >::allocator_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_pop_back", _wrap_MatrixXdVec_pop_back, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_pop_back(MatrixXdVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_erase", _wrap_MatrixXdVec_erase, METH_VARARGS, (char *)"\n"
		"erase(std::vector< MatrixXd >::iterator pos) -> std::vector< MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pos: std::vector< MatrixXd >::iterator\n"
		"\n"
		"MatrixXdVec_erase(MatrixXdVec self, std::vector< MatrixXd >::iterator first, std::vector< MatrixXd >::iterator last) -> std::vector< MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"first: std::vector< MatrixXd >::iterator\n"
		"last: std::vector< MatrixXd >::iterator\n"
		"\n"
		""},
	 { (char *)"new_MatrixXdVec", _wrap_new_MatrixXdVec, METH_VARARGS, (char *)"\n"
		"MatrixXdVec()\n"
		"MatrixXdVec(MatrixXdVec arg2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"arg2: std::vector< MatrixXd > const &\n"
		"\n"
		"MatrixXdVec(std::vector< MatrixXd >::size_type size)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"size: std::vector< MatrixXd >::size_type\n"
		"\n"
		"new_MatrixXdVec(std::vector< MatrixXd >::size_type size, std::vector< MatrixXd >::value_type const & value) -> MatrixXdVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"size: std::vector< MatrixXd >::size_type\n"
		"value: std::vector< MatrixXd >::value_type const &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_push_back", _wrap_MatrixXdVec_push_back, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_push_back(MatrixXdVec self, std::vector< MatrixXd >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"x: std::vector< MatrixXd >::value_type const &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_front", _wrap_MatrixXdVec_front, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_front(MatrixXdVec self) -> std::vector< MatrixXd >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_back", _wrap_MatrixXdVec_back, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_back(MatrixXdVec self) -> std::vector< MatrixXd >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_assign", _wrap_MatrixXdVec_assign, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_assign(MatrixXdVec self, std::vector< MatrixXd >::size_type n, std::vector< MatrixXd >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"n: std::vector< MatrixXd >::size_type\n"
		"x: std::vector< MatrixXd >::value_type const &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_resize", _wrap_MatrixXdVec_resize, METH_VARARGS, (char *)"\n"
		"resize(std::vector< MatrixXd >::size_type new_size)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"new_size: std::vector< MatrixXd >::size_type\n"
		"\n"
		"MatrixXdVec_resize(MatrixXdVec self, std::vector< MatrixXd >::size_type new_size, std::vector< MatrixXd >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"new_size: std::vector< MatrixXd >::size_type\n"
		"x: std::vector< MatrixXd >::value_type const &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_insert", _wrap_MatrixXdVec_insert, METH_VARARGS, (char *)"\n"
		"insert(std::vector< MatrixXd >::iterator pos, std::vector< MatrixXd >::value_type const & x) -> std::vector< MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pos: std::vector< MatrixXd >::iterator\n"
		"x: std::vector< MatrixXd >::value_type const &\n"
		"\n"
		"MatrixXdVec_insert(MatrixXdVec self, std::vector< MatrixXd >::iterator pos, std::vector< MatrixXd >::size_type n, std::vector< MatrixXd >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"pos: std::vector< MatrixXd >::iterator\n"
		"n: std::vector< MatrixXd >::size_type\n"
		"x: std::vector< MatrixXd >::value_type const &\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_reserve", _wrap_MatrixXdVec_reserve, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_reserve(MatrixXdVec self, std::vector< MatrixXd >::size_type n)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"n: std::vector< MatrixXd >::size_type\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_capacity", _wrap_MatrixXdVec_capacity, METH_VARARGS, (char *)"\n"
		"MatrixXdVec_capacity(MatrixXdVec self) -> std::vector< MatrixXd >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"delete_MatrixXdVec", _wrap_delete_MatrixXdVec, METH_VARARGS, (char *)"\n"
		"delete_MatrixXdVec(MatrixXdVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"MatrixXdVec_swigregister", MatrixXdVec_swigregister, METH_VARARGS, NULL},
	 { (char *)"StringVec_iterator", _wrap_StringVec_iterator, METH_VARARGS, (char *)"\n"
		"StringVec_iterator(StringVec self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec___nonzero__", _wrap_StringVec___nonzero__, METH_VARARGS, (char *)"\n"
		"StringVec___nonzero__(StringVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"StringVec___bool__", _wrap_StringVec___bool__, METH_VARARGS, (char *)"\n"
		"StringVec___bool__(StringVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"StringVec___len__", _wrap_StringVec___len__, METH_VARARGS, (char *)"\n"
		"StringVec___len__(StringVec self) -> std::vector< std::string >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"StringVec___getslice__", _wrap_StringVec___getslice__, METH_VARARGS, (char *)"\n"
		"StringVec___getslice__(StringVec self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j) -> StringVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"i: std::vector< std::string >::difference_type\n"
		"j: std::vector< std::string >::difference_type\n"
		"\n"
		""},
	 { (char *)"StringVec___setslice__", _wrap_StringVec___setslice__, METH_VARARGS, (char *)"\n"
		"__setslice__(std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i: std::vector< std::string >::difference_type\n"
		"j: std::vector< std::string >::difference_type\n"
		"\n"
		"StringVec___setslice__(StringVec self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j, StringVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"i: std::vector< std::string >::difference_type\n"
		"j: std::vector< std::string >::difference_type\n"
		"v: std::vector< std::string,std::allocator< std::string > > const &\n"
		"\n"
		""},
	 { (char *)"StringVec___delslice__", _wrap_StringVec___delslice__, METH_VARARGS, (char *)"\n"
		"StringVec___delslice__(StringVec self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"i: std::vector< std::string >::difference_type\n"
		"j: std::vector< std::string >::difference_type\n"
		"\n"
		""},
	 { (char *)"StringVec___delitem__", _wrap_StringVec___delitem__, METH_VARARGS, (char *)"\n"
		"__delitem__(std::vector< std::string >::difference_type i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i: std::vector< std::string >::difference_type\n"
		"\n"
		"StringVec___delitem__(StringVec self, PySliceObject * slice)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"slice: PySliceObject *\n"
		"\n"
		""},
	 { (char *)"StringVec___getitem__", _wrap_StringVec___getitem__, METH_VARARGS, (char *)"\n"
		"__getitem__(PySliceObject * slice) -> StringVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"\n"
		"StringVec___getitem__(StringVec self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"i: std::vector< std::string >::difference_type\n"
		"\n"
		""},
	 { (char *)"StringVec___setitem__", _wrap_StringVec___setitem__, METH_VARARGS, (char *)"\n"
		"__setitem__(PySliceObject * slice, StringVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"v: std::vector< std::string,std::allocator< std::string > > const &\n"
		"\n"
		"__setitem__(PySliceObject * slice)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"\n"
		"StringVec___setitem__(StringVec self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"i: std::vector< std::string >::difference_type\n"
		"x: std::vector< std::string >::value_type const &\n"
		"\n"
		""},
	 { (char *)"StringVec_pop", _wrap_StringVec_pop, METH_VARARGS, (char *)"\n"
		"StringVec_pop(StringVec self) -> std::vector< std::string >::value_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec_append", _wrap_StringVec_append, METH_VARARGS, (char *)"\n"
		"StringVec_append(StringVec self, std::vector< std::string >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"x: std::vector< std::string >::value_type const &\n"
		"\n"
		""},
	 { (char *)"StringVec_empty", _wrap_StringVec_empty, METH_VARARGS, (char *)"\n"
		"StringVec_empty(StringVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"StringVec_size", _wrap_StringVec_size, METH_VARARGS, (char *)"\n"
		"StringVec_size(StringVec self) -> std::vector< std::string >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"StringVec_swap", _wrap_StringVec_swap, METH_VARARGS, (char *)"\n"
		"StringVec_swap(StringVec self, StringVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"v: std::vector< std::string > &\n"
		"\n"
		""},
	 { (char *)"StringVec_begin", _wrap_StringVec_begin, METH_VARARGS, (char *)"\n"
		"StringVec_begin(StringVec self) -> std::vector< std::string >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec_end", _wrap_StringVec_end, METH_VARARGS, (char *)"\n"
		"StringVec_end(StringVec self) -> std::vector< std::string >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec_rbegin", _wrap_StringVec_rbegin, METH_VARARGS, (char *)"\n"
		"StringVec_rbegin(StringVec self) -> std::vector< std::string >::reverse_iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec_rend", _wrap_StringVec_rend, METH_VARARGS, (char *)"\n"
		"StringVec_rend(StringVec self) -> std::vector< std::string >::reverse_iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec_clear", _wrap_StringVec_clear, METH_VARARGS, (char *)"\n"
		"StringVec_clear(StringVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec_get_allocator", _wrap_StringVec_get_allocator, METH_VARARGS, (char *)"\n"
		"StringVec_get_allocator(StringVec self) -> std::vector< std::string >::allocator_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"StringVec_pop_back", _wrap_StringVec_pop_back, METH_VARARGS, (char *)"\n"
		"StringVec_pop_back(StringVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec_erase", _wrap_StringVec_erase, METH_VARARGS, (char *)"\n"
		"erase(std::vector< std::string >::iterator pos) -> std::vector< std::string >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pos: std::vector< std::string >::iterator\n"
		"\n"
		"StringVec_erase(StringVec self, std::vector< std::string >::iterator first, std::vector< std::string >::iterator last) -> std::vector< std::string >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"first: std::vector< std::string >::iterator\n"
		"last: std::vector< std::string >::iterator\n"
		"\n"
		""},
	 { (char *)"new_StringVec", _wrap_new_StringVec, METH_VARARGS, (char *)"\n"
		"StringVec()\n"
		"StringVec(StringVec arg2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"arg2: std::vector< std::string > const &\n"
		"\n"
		"StringVec(std::vector< std::string >::size_type size)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"size: std::vector< std::string >::size_type\n"
		"\n"
		"new_StringVec(std::vector< std::string >::size_type size, std::vector< std::string >::value_type const & value) -> StringVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"size: std::vector< std::string >::size_type\n"
		"value: std::vector< std::string >::value_type const &\n"
		"\n"
		""},
	 { (char *)"StringVec_push_back", _wrap_StringVec_push_back, METH_VARARGS, (char *)"\n"
		"StringVec_push_back(StringVec self, std::vector< std::string >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"x: std::vector< std::string >::value_type const &\n"
		"\n"
		""},
	 { (char *)"StringVec_front", _wrap_StringVec_front, METH_VARARGS, (char *)"\n"
		"StringVec_front(StringVec self) -> std::vector< std::string >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"StringVec_back", _wrap_StringVec_back, METH_VARARGS, (char *)"\n"
		"StringVec_back(StringVec self) -> std::vector< std::string >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"StringVec_assign", _wrap_StringVec_assign, METH_VARARGS, (char *)"\n"
		"StringVec_assign(StringVec self, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"n: std::vector< std::string >::size_type\n"
		"x: std::vector< std::string >::value_type const &\n"
		"\n"
		""},
	 { (char *)"StringVec_resize", _wrap_StringVec_resize, METH_VARARGS, (char *)"\n"
		"resize(std::vector< std::string >::size_type new_size)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"new_size: std::vector< std::string >::size_type\n"
		"\n"
		"StringVec_resize(StringVec self, std::vector< std::string >::size_type new_size, std::vector< std::string >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"new_size: std::vector< std::string >::size_type\n"
		"x: std::vector< std::string >::value_type const &\n"
		"\n"
		""},
	 { (char *)"StringVec_insert", _wrap_StringVec_insert, METH_VARARGS, (char *)"\n"
		"insert(std::vector< std::string >::iterator pos, std::vector< std::string >::value_type const & x) -> std::vector< std::string >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pos: std::vector< std::string >::iterator\n"
		"x: std::vector< std::string >::value_type const &\n"
		"\n"
		"StringVec_insert(StringVec self, std::vector< std::string >::iterator pos, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"pos: std::vector< std::string >::iterator\n"
		"n: std::vector< std::string >::size_type\n"
		"x: std::vector< std::string >::value_type const &\n"
		"\n"
		""},
	 { (char *)"StringVec_reserve", _wrap_StringVec_reserve, METH_VARARGS, (char *)"\n"
		"StringVec_reserve(StringVec self, std::vector< std::string >::size_type n)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"n: std::vector< std::string >::size_type\n"
		"\n"
		""},
	 { (char *)"StringVec_capacity", _wrap_StringVec_capacity, METH_VARARGS, (char *)"\n"
		"StringVec_capacity(StringVec self) -> std::vector< std::string >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > const *\n"
		"\n"
		""},
	 { (char *)"delete_StringVec", _wrap_delete_StringVec, METH_VARARGS, (char *)"\n"
		"delete_StringVec(StringVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< std::string > *\n"
		"\n"
		""},
	 { (char *)"StringVec_swigregister", StringVec_swigregister, METH_VARARGS, NULL},
	 { (char *)"StringMatrixMap_iterator", _wrap_StringMatrixMap_iterator, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_iterator(StringMatrixMap self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap___nonzero__", _wrap_StringMatrixMap___nonzero__, METH_VARARGS, (char *)"\n"
		"StringMatrixMap___nonzero__(StringMatrixMap self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap___bool__", _wrap_StringMatrixMap___bool__, METH_VARARGS, (char *)"\n"
		"StringMatrixMap___bool__(StringMatrixMap self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap___len__", _wrap_StringMatrixMap___len__, METH_VARARGS, (char *)"\n"
		"StringMatrixMap___len__(StringMatrixMap self) -> std::map< std::string,MatrixXd >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap___getitem__", _wrap_StringMatrixMap___getitem__, METH_VARARGS, (char *)"\n"
		"StringMatrixMap___getitem__(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & key) -> std::map< std::string,MatrixXd >::mapped_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"key: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap___delitem__", _wrap_StringMatrixMap___delitem__, METH_VARARGS, (char *)"\n"
		"StringMatrixMap___delitem__(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & key)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"key: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_has_key", _wrap_StringMatrixMap_has_key, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_has_key(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & key) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > const *\n"
		"key: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_keys", _wrap_StringMatrixMap_keys, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_keys(StringMatrixMap self) -> PyObject *\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_values", _wrap_StringMatrixMap_values, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_values(StringMatrixMap self) -> PyObject *\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_items", _wrap_StringMatrixMap_items, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_items(StringMatrixMap self) -> PyObject *\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap___contains__", _wrap_StringMatrixMap___contains__, METH_VARARGS, (char *)"\n"
		"StringMatrixMap___contains__(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & key) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"key: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_key_iterator", _wrap_StringMatrixMap_key_iterator, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_key_iterator(StringMatrixMap self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_value_iterator", _wrap_StringMatrixMap_value_iterator, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_value_iterator(StringMatrixMap self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap___setitem__", _wrap_StringMatrixMap___setitem__, METH_VARARGS, (char *)"\n"
		"__setitem__(std::map< std::string,MatrixXd >::key_type const & key)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"key: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		"StringMatrixMap___setitem__(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & key, std::map< std::string,MatrixXd >::mapped_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"key: std::map< std::string,MatrixXd >::key_type const &\n"
		"x: std::map< std::string,MatrixXd >::mapped_type const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_asdict", _wrap_StringMatrixMap_asdict, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_asdict(StringMatrixMap self) -> PyObject *\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"new_StringMatrixMap", _wrap_new_StringMatrixMap, METH_VARARGS, (char *)"\n"
		"StringMatrixMap(std::less< std::string > const & arg2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"arg2: std::less< std::string > const &\n"
		"\n"
		"StringMatrixMap()\n"
		"new_StringMatrixMap(StringMatrixMap arg2) -> StringMatrixMap\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"arg1: std::map< std::string,MatrixXd > const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_empty", _wrap_StringMatrixMap_empty, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_empty(StringMatrixMap self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_size", _wrap_StringMatrixMap_size, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_size(StringMatrixMap self) -> std::map< std::string,MatrixXd >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_swap", _wrap_StringMatrixMap_swap, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_swap(StringMatrixMap self, StringMatrixMap v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"v: std::map< std::string,MatrixXd > &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_begin", _wrap_StringMatrixMap_begin, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_begin(StringMatrixMap self) -> std::map< std::string,MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_end", _wrap_StringMatrixMap_end, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_end(StringMatrixMap self) -> std::map< std::string,MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_rbegin", _wrap_StringMatrixMap_rbegin, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_rbegin(StringMatrixMap self) -> std::map< std::string,MatrixXd >::reverse_iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_rend", _wrap_StringMatrixMap_rend, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_rend(StringMatrixMap self) -> std::map< std::string,MatrixXd >::reverse_iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_clear", _wrap_StringMatrixMap_clear, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_clear(StringMatrixMap self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_get_allocator", _wrap_StringMatrixMap_get_allocator, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_get_allocator(StringMatrixMap self) -> std::map< std::string,MatrixXd >::allocator_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_count", _wrap_StringMatrixMap_count, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_count(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & x) -> std::map< std::string,MatrixXd >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > const *\n"
		"x: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_erase", _wrap_StringMatrixMap_erase, METH_VARARGS, (char *)"\n"
		"erase(std::map< std::string,MatrixXd >::key_type const & x) -> std::map< std::string,MatrixXd >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"x: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		"erase(std::map< std::string,MatrixXd >::iterator position)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"position: std::map< std::string,MatrixXd >::iterator\n"
		"\n"
		"StringMatrixMap_erase(StringMatrixMap self, std::map< std::string,MatrixXd >::iterator first, std::map< std::string,MatrixXd >::iterator last)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"first: std::map< std::string,MatrixXd >::iterator\n"
		"last: std::map< std::string,MatrixXd >::iterator\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_find", _wrap_StringMatrixMap_find, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_find(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & x) -> std::map< std::string,MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"x: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_lower_bound", _wrap_StringMatrixMap_lower_bound, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_lower_bound(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & x) -> std::map< std::string,MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"x: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_upper_bound", _wrap_StringMatrixMap_upper_bound, METH_VARARGS, (char *)"\n"
		"StringMatrixMap_upper_bound(StringMatrixMap self, std::map< std::string,MatrixXd >::key_type const & x) -> std::map< std::string,MatrixXd >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"x: std::map< std::string,MatrixXd >::key_type const &\n"
		"\n"
		""},
	 { (char *)"delete_StringMatrixMap", _wrap_delete_StringMatrixMap, METH_VARARGS, (char *)"\n"
		"delete_StringMatrixMap(StringMatrixMap self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::map< std::string,MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"StringMatrixMap_swigregister", StringMatrixMap_swigregister, METH_VARARGS, NULL},
	 { (char *)"VectorXiVec_iterator", _wrap_VectorXiVec_iterator, METH_VARARGS, (char *)"\n"
		"VectorXiVec_iterator(VectorXiVec self) -> SwigPyIterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___nonzero__", _wrap_VectorXiVec___nonzero__, METH_VARARGS, (char *)"\n"
		"VectorXiVec___nonzero__(VectorXiVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___bool__", _wrap_VectorXiVec___bool__, METH_VARARGS, (char *)"\n"
		"VectorXiVec___bool__(VectorXiVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___len__", _wrap_VectorXiVec___len__, METH_VARARGS, (char *)"\n"
		"VectorXiVec___len__(VectorXiVec self) -> std::vector< VectorXi >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___getslice__", _wrap_VectorXiVec___getslice__, METH_VARARGS, (char *)"\n"
		"VectorXiVec___getslice__(VectorXiVec self, std::vector< VectorXi >::difference_type i, std::vector< VectorXi >::difference_type j) -> VectorXiVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"i: std::vector< VectorXi >::difference_type\n"
		"j: std::vector< VectorXi >::difference_type\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___setslice__", _wrap_VectorXiVec___setslice__, METH_VARARGS, (char *)"\n"
		"__setslice__(std::vector< VectorXi >::difference_type i, std::vector< VectorXi >::difference_type j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i: std::vector< VectorXi >::difference_type\n"
		"j: std::vector< VectorXi >::difference_type\n"
		"\n"
		"VectorXiVec___setslice__(VectorXiVec self, std::vector< VectorXi >::difference_type i, std::vector< VectorXi >::difference_type j, VectorXiVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"i: std::vector< VectorXi >::difference_type\n"
		"j: std::vector< VectorXi >::difference_type\n"
		"v: std::vector< VectorXi,std::allocator< VectorXi > > const &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___delslice__", _wrap_VectorXiVec___delslice__, METH_VARARGS, (char *)"\n"
		"VectorXiVec___delslice__(VectorXiVec self, std::vector< VectorXi >::difference_type i, std::vector< VectorXi >::difference_type j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"i: std::vector< VectorXi >::difference_type\n"
		"j: std::vector< VectorXi >::difference_type\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___delitem__", _wrap_VectorXiVec___delitem__, METH_VARARGS, (char *)"\n"
		"__delitem__(std::vector< VectorXi >::difference_type i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i: std::vector< VectorXi >::difference_type\n"
		"\n"
		"VectorXiVec___delitem__(VectorXiVec self, PySliceObject * slice)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"slice: PySliceObject *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___getitem__", _wrap_VectorXiVec___getitem__, METH_VARARGS, (char *)"\n"
		"__getitem__(PySliceObject * slice) -> VectorXiVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"\n"
		"VectorXiVec___getitem__(VectorXiVec self, std::vector< VectorXi >::difference_type i) -> std::vector< VectorXi >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"i: std::vector< VectorXi >::difference_type\n"
		"\n"
		""},
	 { (char *)"VectorXiVec___setitem__", _wrap_VectorXiVec___setitem__, METH_VARARGS, (char *)"\n"
		"__setitem__(PySliceObject * slice, VectorXiVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"v: std::vector< VectorXi,std::allocator< VectorXi > > const &\n"
		"\n"
		"__setitem__(PySliceObject * slice)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"slice: PySliceObject *\n"
		"\n"
		"VectorXiVec___setitem__(VectorXiVec self, std::vector< VectorXi >::difference_type i, std::vector< VectorXi >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"i: std::vector< VectorXi >::difference_type\n"
		"x: std::vector< VectorXi >::value_type const &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_pop", _wrap_VectorXiVec_pop, METH_VARARGS, (char *)"\n"
		"VectorXiVec_pop(VectorXiVec self) -> std::vector< VectorXi >::value_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_append", _wrap_VectorXiVec_append, METH_VARARGS, (char *)"\n"
		"VectorXiVec_append(VectorXiVec self, std::vector< VectorXi >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"x: std::vector< VectorXi >::value_type const &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_empty", _wrap_VectorXiVec_empty, METH_VARARGS, (char *)"\n"
		"VectorXiVec_empty(VectorXiVec self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_size", _wrap_VectorXiVec_size, METH_VARARGS, (char *)"\n"
		"VectorXiVec_size(VectorXiVec self) -> std::vector< VectorXi >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_swap", _wrap_VectorXiVec_swap, METH_VARARGS, (char *)"\n"
		"VectorXiVec_swap(VectorXiVec self, VectorXiVec v)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"v: std::vector< VectorXi > &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_begin", _wrap_VectorXiVec_begin, METH_VARARGS, (char *)"\n"
		"VectorXiVec_begin(VectorXiVec self) -> std::vector< VectorXi >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_end", _wrap_VectorXiVec_end, METH_VARARGS, (char *)"\n"
		"VectorXiVec_end(VectorXiVec self) -> std::vector< VectorXi >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_rbegin", _wrap_VectorXiVec_rbegin, METH_VARARGS, (char *)"\n"
		"VectorXiVec_rbegin(VectorXiVec self) -> std::vector< VectorXi >::reverse_iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_rend", _wrap_VectorXiVec_rend, METH_VARARGS, (char *)"\n"
		"VectorXiVec_rend(VectorXiVec self) -> std::vector< VectorXi >::reverse_iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_clear", _wrap_VectorXiVec_clear, METH_VARARGS, (char *)"\n"
		"VectorXiVec_clear(VectorXiVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_get_allocator", _wrap_VectorXiVec_get_allocator, METH_VARARGS, (char *)"\n"
		"VectorXiVec_get_allocator(VectorXiVec self) -> std::vector< VectorXi >::allocator_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_pop_back", _wrap_VectorXiVec_pop_back, METH_VARARGS, (char *)"\n"
		"VectorXiVec_pop_back(VectorXiVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_erase", _wrap_VectorXiVec_erase, METH_VARARGS, (char *)"\n"
		"erase(std::vector< VectorXi >::iterator pos) -> std::vector< VectorXi >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pos: std::vector< VectorXi >::iterator\n"
		"\n"
		"VectorXiVec_erase(VectorXiVec self, std::vector< VectorXi >::iterator first, std::vector< VectorXi >::iterator last) -> std::vector< VectorXi >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"first: std::vector< VectorXi >::iterator\n"
		"last: std::vector< VectorXi >::iterator\n"
		"\n"
		""},
	 { (char *)"new_VectorXiVec", _wrap_new_VectorXiVec, METH_VARARGS, (char *)"\n"
		"VectorXiVec()\n"
		"VectorXiVec(VectorXiVec arg2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"arg2: std::vector< VectorXi > const &\n"
		"\n"
		"VectorXiVec(std::vector< VectorXi >::size_type size)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"size: std::vector< VectorXi >::size_type\n"
		"\n"
		"new_VectorXiVec(std::vector< VectorXi >::size_type size, std::vector< VectorXi >::value_type const & value) -> VectorXiVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"size: std::vector< VectorXi >::size_type\n"
		"value: std::vector< VectorXi >::value_type const &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_push_back", _wrap_VectorXiVec_push_back, METH_VARARGS, (char *)"\n"
		"VectorXiVec_push_back(VectorXiVec self, std::vector< VectorXi >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"x: std::vector< VectorXi >::value_type const &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_front", _wrap_VectorXiVec_front, METH_VARARGS, (char *)"\n"
		"VectorXiVec_front(VectorXiVec self) -> std::vector< VectorXi >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_back", _wrap_VectorXiVec_back, METH_VARARGS, (char *)"\n"
		"VectorXiVec_back(VectorXiVec self) -> std::vector< VectorXi >::value_type const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_assign", _wrap_VectorXiVec_assign, METH_VARARGS, (char *)"\n"
		"VectorXiVec_assign(VectorXiVec self, std::vector< VectorXi >::size_type n, std::vector< VectorXi >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"n: std::vector< VectorXi >::size_type\n"
		"x: std::vector< VectorXi >::value_type const &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_resize", _wrap_VectorXiVec_resize, METH_VARARGS, (char *)"\n"
		"resize(std::vector< VectorXi >::size_type new_size)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"new_size: std::vector< VectorXi >::size_type\n"
		"\n"
		"VectorXiVec_resize(VectorXiVec self, std::vector< VectorXi >::size_type new_size, std::vector< VectorXi >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"new_size: std::vector< VectorXi >::size_type\n"
		"x: std::vector< VectorXi >::value_type const &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_insert", _wrap_VectorXiVec_insert, METH_VARARGS, (char *)"\n"
		"insert(std::vector< VectorXi >::iterator pos, std::vector< VectorXi >::value_type const & x) -> std::vector< VectorXi >::iterator\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pos: std::vector< VectorXi >::iterator\n"
		"x: std::vector< VectorXi >::value_type const &\n"
		"\n"
		"VectorXiVec_insert(VectorXiVec self, std::vector< VectorXi >::iterator pos, std::vector< VectorXi >::size_type n, std::vector< VectorXi >::value_type const & x)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"pos: std::vector< VectorXi >::iterator\n"
		"n: std::vector< VectorXi >::size_type\n"
		"x: std::vector< VectorXi >::value_type const &\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_reserve", _wrap_VectorXiVec_reserve, METH_VARARGS, (char *)"\n"
		"VectorXiVec_reserve(VectorXiVec self, std::vector< VectorXi >::size_type n)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"n: std::vector< VectorXi >::size_type\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_capacity", _wrap_VectorXiVec_capacity, METH_VARARGS, (char *)"\n"
		"VectorXiVec_capacity(VectorXiVec self) -> std::vector< VectorXi >::size_type\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > const *\n"
		"\n"
		""},
	 { (char *)"delete_VectorXiVec", _wrap_delete_VectorXiVec, METH_VARARGS, (char *)"\n"
		"delete_VectorXiVec(VectorXiVec self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: std::vector< VectorXi > *\n"
		"\n"
		""},
	 { (char *)"VectorXiVec_swigregister", VectorXiVec_swigregister, METH_VARARGS, NULL},
	 { (char *)"PI_swigconstant", PI_swigconstant, METH_VARARGS, NULL},
	 { (char *)"isnan", _wrap_isnan, METH_VARARGS, (char *)"\n"
		"isnan(limix::mfloat_t val) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"val: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"isinf", _wrap_isinf, METH_VARARGS, (char *)"\n"
		"isinf(limix::mfloat_t value) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"value: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"exp", _wrap_exp, METH_VARARGS, (char *)"\n"
		"exp(limix::mfloat_t x) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"x: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"sqrt", _wrap_sqrt, METH_VARARGS, (char *)"\n"
		"sqrt(limix::mfloat_t x) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"x: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"log", _wrap_log, METH_VARARGS, (char *)"\n"
		"log(limix::mfloat_t x) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"x: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"inverse", _wrap_inverse, METH_VARARGS, (char *)"\n"
		"inverse(limix::mfloat_t x) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"x: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"new_CLimixException", _wrap_new_CLimixException, METH_VARARGS, (char *)"\n"
		"CLimixException(std::string str)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"str: std::string\n"
		"\n"
		"new_CLimixException() -> CLimixException\n"
		""},
	 { (char *)"delete_CLimixException", _wrap_delete_CLimixException, METH_VARARGS, (char *)"\n"
		"delete_CLimixException(CLimixException self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLimixException *\n"
		"\n"
		""},
	 { (char *)"CLimixException_what", _wrap_CLimixException_what, METH_VARARGS, (char *)"\n"
		"CLimixException_what(CLimixException self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLimixException *\n"
		"\n"
		""},
	 { (char *)"CLimixException_swigregister", CLimixException_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CParamObject", _wrap_new_CParamObject, METH_VARARGS, (char *)"new_CParamObject() -> CParamObject"},
	 { (char *)"CParamObject_addSyncParent", _wrap_CParamObject_addSyncParent, METH_VARARGS, (char *)"\n"
		"CParamObject_addSyncParent(CParamObject self, limix::Pbool l)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CParamObject *\n"
		"l: limix::Pbool\n"
		"\n"
		""},
	 { (char *)"CParamObject_addSyncChild", _wrap_CParamObject_addSyncChild, METH_VARARGS, (char *)"\n"
		"CParamObject_addSyncChild(CParamObject self, limix::Pbool l)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CParamObject *\n"
		"l: limix::Pbool\n"
		"\n"
		""},
	 { (char *)"CParamObject_delSyncParent", _wrap_CParamObject_delSyncParent, METH_VARARGS, (char *)"\n"
		"CParamObject_delSyncParent(CParamObject self, limix::Pbool l)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CParamObject *\n"
		"l: limix::Pbool\n"
		"\n"
		""},
	 { (char *)"CParamObject_delSyncChild", _wrap_CParamObject_delSyncChild, METH_VARARGS, (char *)"\n"
		"CParamObject_delSyncChild(CParamObject self, limix::Pbool l)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CParamObject *\n"
		"l: limix::Pbool\n"
		"\n"
		""},
	 { (char *)"CParamObject_propagateSync", _wrap_CParamObject_propagateSync, METH_VARARGS, (char *)"\n"
		"propagateSync(bool state=False)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"state: bool\n"
		"\n"
		"CParamObject_propagateSync(CParamObject self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CParamObject *\n"
		"\n"
		""},
	 { (char *)"CParamObject_isInSync", _wrap_CParamObject_isInSync, METH_VARARGS, (char *)"\n"
		"CParamObject_isInSync(CParamObject self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CParamObject *\n"
		"\n"
		""},
	 { (char *)"CParamObject_setSync", _wrap_CParamObject_setSync, METH_VARARGS, (char *)"\n"
		"setSync(bool state=True)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"state: bool\n"
		"\n"
		"CParamObject_setSync(CParamObject self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CParamObject *\n"
		"\n"
		""},
	 { (char *)"delete_CParamObject", _wrap_delete_CParamObject, METH_VARARGS, (char *)"\n"
		"delete_CParamObject(CParamObject self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CParamObject *\n"
		"\n"
		""},
	 { (char *)"CParamObject_swigregister", CParamObject_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CNamedCache", _wrap_new_CNamedCache, METH_VARARGS, (char *)"new_CNamedCache() -> CNamedCache"},
	 { (char *)"delete_CNamedCache", _wrap_delete_CNamedCache, METH_VARARGS, (char *)"\n"
		"delete_CNamedCache(CNamedCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CNamedCache *\n"
		"\n"
		""},
	 { (char *)"CNamedCache_set", _wrap_CNamedCache_set, METH_VARARGS, (char *)"\n"
		"CNamedCache_set(CNamedCache self, std::string name, PCVoid m)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CNamedCache *\n"
		"name: std::string\n"
		"m: PCVoid\n"
		"\n"
		""},
	 { (char *)"CNamedCache_get", _wrap_CNamedCache_get, METH_VARARGS, (char *)"\n"
		"CNamedCache_get(CNamedCache self, std::string const & name) -> PCVoid\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CNamedCache *\n"
		"name: std::string const &\n"
		"\n"
		""},
	 { (char *)"CNamedCache_swigregister", CNamedCache_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_ACovarianceFunction", _wrap_delete_ACovarianceFunction, METH_VARARGS, (char *)"\n"
		"delete_ACovarianceFunction(ACovarianceFunction self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getName", _wrap_ACovarianceFunction_getName, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getName(ACovarianceFunction self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_setParams", _wrap_ACovarianceFunction_setParams, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_setParams(ACovarianceFunction self, limix::CovarParams const & params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction *\n"
		"params: limix::CovarParams const &\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getParams", _wrap_ACovarianceFunction_getParams, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getParams(ACovarianceFunction self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getParamBounds0", _wrap_ACovarianceFunction_getParamBounds0, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getParamBounds0(ACovarianceFunction self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getParamBounds", _wrap_ACovarianceFunction_getParamBounds, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getParamBounds(ACovarianceFunction self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_setParamBounds", _wrap_ACovarianceFunction_setParamBounds, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_setParamBounds(ACovarianceFunction self, limix::CovarParams const & lower, limix::CovarParams const & upper)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction *\n"
		"lower: limix::CovarParams const &\n"
		"upper: limix::CovarParams const &\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getParamMask", _wrap_ACovarianceFunction_getParamMask, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getParamMask(ACovarianceFunction self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_setParamMask", _wrap_ACovarianceFunction_setParamMask, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_setParamMask(ACovarianceFunction self, limix::CovarParams const & params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction *\n"
		"params: limix::CovarParams const &\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_setX", _wrap_ACovarianceFunction_setX, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_setX(ACovarianceFunction self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_setXcol", _wrap_ACovarianceFunction_setXcol, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_setXcol(ACovarianceFunction self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getX", _wrap_ACovarianceFunction_getX, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getX(ACovarianceFunction self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getDimX", _wrap_ACovarianceFunction_getDimX, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getDimX(ACovarianceFunction self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getNumberParams", _wrap_ACovarianceFunction_getNumberParams, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getNumberParams(ACovarianceFunction self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_getNumberDimensions", _wrap_ACovarianceFunction_getNumberDimensions, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_getNumberDimensions(ACovarianceFunction self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_setNumberDimensions", _wrap_ACovarianceFunction_setNumberDimensions, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_setNumberDimensions(ACovarianceFunction self, limix::muint_t numberDimensions)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction *\n"
		"numberDimensions: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Kdim", _wrap_ACovarianceFunction_Kdim, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Kdim(ACovarianceFunction self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_K", _wrap_ACovarianceFunction_K, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_K(ACovarianceFunction self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Kdiag", _wrap_ACovarianceFunction_Kdiag, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Kdiag(ACovarianceFunction self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Kgrad_X", _wrap_ACovarianceFunction_Kgrad_X, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Kgrad_X(ACovarianceFunction self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Kcross", _wrap_ACovarianceFunction_Kcross, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Kcross(ACovarianceFunction self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Kcross_diag", _wrap_ACovarianceFunction_Kcross_diag, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Kcross_diag(ACovarianceFunction self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Kgrad_param", _wrap_ACovarianceFunction_Kgrad_param, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Kgrad_param(ACovarianceFunction self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Khess_param", _wrap_ACovarianceFunction_Khess_param, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Khess_param(ACovarianceFunction self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Kcross_grad_X", _wrap_ACovarianceFunction_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Kcross_grad_X(ACovarianceFunction self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Kdiag_grad_X", _wrap_ACovarianceFunction_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Kdiag_grad_X(ACovarianceFunction self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ACovarianceFunction const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_check_covariance_Kgrad_theta", _wrap_ACovarianceFunction_check_covariance_Kgrad_theta, METH_VARARGS, (char *)"\n"
		"check_covariance_Kgrad_theta(ACovarianceFunction covar, limix::mfloat_t relchange=1E-5, limix::mfloat_t threshold=1E-2) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::ACovarianceFunction &\n"
		"relchange: limix::mfloat_t\n"
		"threshold: limix::mfloat_t\n"
		"\n"
		"check_covariance_Kgrad_theta(ACovarianceFunction covar, limix::mfloat_t relchange=1E-5) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::ACovarianceFunction &\n"
		"relchange: limix::mfloat_t\n"
		"\n"
		"ACovarianceFunction_check_covariance_Kgrad_theta(ACovarianceFunction covar) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::ACovarianceFunction &\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_check_covariance_Kgrad_x", _wrap_ACovarianceFunction_check_covariance_Kgrad_x, METH_VARARGS, (char *)"\n"
		"check_covariance_Kgrad_x(ACovarianceFunction covar, limix::mfloat_t relchange=1E-5, limix::mfloat_t threshold=1E-2, bool check_diag=True) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::ACovarianceFunction &\n"
		"relchange: limix::mfloat_t\n"
		"threshold: limix::mfloat_t\n"
		"check_diag: bool\n"
		"\n"
		"check_covariance_Kgrad_x(ACovarianceFunction covar, limix::mfloat_t relchange=1E-5, limix::mfloat_t threshold=1E-2) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::ACovarianceFunction &\n"
		"relchange: limix::mfloat_t\n"
		"threshold: limix::mfloat_t\n"
		"\n"
		"check_covariance_Kgrad_x(ACovarianceFunction covar, limix::mfloat_t relchange=1E-5) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::ACovarianceFunction &\n"
		"relchange: limix::mfloat_t\n"
		"\n"
		"ACovarianceFunction_check_covariance_Kgrad_x(ACovarianceFunction covar) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::ACovarianceFunction &\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_Khess_param_num", _wrap_ACovarianceFunction_Khess_param_num, METH_VARARGS, (char *)"\n"
		"ACovarianceFunction_Khess_param_num(ACovarianceFunction covar, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::ACovarianceFunction &\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"ACovarianceFunction_swigregister", ACovarianceFunction_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CCovarianceFunctionCacheOld", _wrap_new_CCovarianceFunctionCacheOld, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld()\n"
		"new_CCovarianceFunctionCacheOld(limix::PCovarianceFunction covar) -> CCovarianceFunctionCacheOld\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"delete_CCovarianceFunctionCacheOld", _wrap_delete_CCovarianceFunctionCacheOld, METH_VARARGS, (char *)"\n"
		"delete_CCovarianceFunctionCacheOld(CCovarianceFunctionCacheOld self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_setCovar", _wrap_CCovarianceFunctionCacheOld_setCovar, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld_setCovar(CCovarianceFunctionCacheOld self, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_addSyncChild", _wrap_CCovarianceFunctionCacheOld_addSyncChild, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld_addSyncChild(CCovarianceFunctionCacheOld self, limix::Pbool l)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"l: limix::Pbool\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_delSyncChild", _wrap_CCovarianceFunctionCacheOld_delSyncChild, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld_delSyncChild(CCovarianceFunctionCacheOld self, limix::Pbool l)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"l: limix::Pbool\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_getCovar", _wrap_CCovarianceFunctionCacheOld_getCovar, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld_getCovar(CCovarianceFunctionCacheOld self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_rgetK", _wrap_CCovarianceFunctionCacheOld_rgetK, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld_rgetK(CCovarianceFunctionCacheOld self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_rgetUK", _wrap_CCovarianceFunctionCacheOld_rgetUK, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld_rgetUK(CCovarianceFunctionCacheOld self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_rgetSK", _wrap_CCovarianceFunctionCacheOld_rgetSK, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld_rgetSK(CCovarianceFunctionCacheOld self) -> VectorXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_rgetCholK", _wrap_CCovarianceFunctionCacheOld_rgetCholK, METH_VARARGS, (char *)"\n"
		"CCovarianceFunctionCacheOld_rgetCholK(CCovarianceFunctionCacheOld self) -> MatrixXdChol &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovarianceFunctionCacheOld *\n"
		"\n"
		""},
	 { (char *)"CCovarianceFunctionCacheOld_swigregister", CCovarianceFunctionCacheOld_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CCovLinearISO", _wrap_new_CCovLinearISO, METH_VARARGS, (char *)"\n"
		"CCovLinearISO(limix::muint_t numberDimensions=1)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberDimensions: limix::muint_t\n"
		"\n"
		"new_CCovLinearISO() -> CCovLinearISO\n"
		""},
	 { (char *)"delete_CCovLinearISO", _wrap_delete_CCovLinearISO, METH_VARARGS, (char *)"\n"
		"delete_CCovLinearISO(CCovLinearISO self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISO *\n"
		"\n"
		""},
	 { (char *)"CCovLinearISO_Kcross", _wrap_CCovLinearISO_Kcross, METH_VARARGS, (char *)"\n"
		"CCovLinearISO_Kcross(CCovLinearISO self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISO const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CCovLinearISO_Kcross_diag", _wrap_CCovLinearISO_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CCovLinearISO_Kcross_diag(CCovLinearISO self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISO const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CCovLinearISO_Kgrad_param", _wrap_CCovLinearISO_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CCovLinearISO_Kgrad_param(CCovLinearISO self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISO const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearISO_Khess_param", _wrap_CCovLinearISO_Khess_param, METH_VARARGS, (char *)"\n"
		"CCovLinearISO_Khess_param(CCovLinearISO self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISO const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearISO_Kcross_grad_X", _wrap_CCovLinearISO_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CCovLinearISO_Kcross_grad_X(CCovLinearISO self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISO const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearISO_Kdiag_grad_X", _wrap_CCovLinearISO_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CCovLinearISO_Kdiag_grad_X(CCovLinearISO self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISO const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearISO_getName", _wrap_CCovLinearISO_getName, METH_VARARGS, (char *)"\n"
		"CCovLinearISO_getName(CCovLinearISO self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISO const *\n"
		"\n"
		""},
	 { (char *)"CCovLinearISO_swigregister", CCovLinearISO_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CCovLinearARD", _wrap_new_CCovLinearARD, METH_VARARGS, (char *)"\n"
		"CCovLinearARD(limix::muint_t numberDimensions=1)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberDimensions: limix::muint_t\n"
		"\n"
		"new_CCovLinearARD() -> CCovLinearARD\n"
		""},
	 { (char *)"delete_CCovLinearARD", _wrap_delete_CCovLinearARD, METH_VARARGS, (char *)"\n"
		"delete_CCovLinearARD(CCovLinearARD self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD *\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_setNumberDimensions", _wrap_CCovLinearARD_setNumberDimensions, METH_VARARGS, (char *)"\n"
		"CCovLinearARD_setNumberDimensions(CCovLinearARD self, limix::muint_t numberDimensions)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD *\n"
		"numberDimensions: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_Kcross", _wrap_CCovLinearARD_Kcross, METH_VARARGS, (char *)"\n"
		"CCovLinearARD_Kcross(CCovLinearARD self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_Kcross_diag", _wrap_CCovLinearARD_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CCovLinearARD_Kcross_diag(CCovLinearARD self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_Kgrad_param", _wrap_CCovLinearARD_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CCovLinearARD_Kgrad_param(CCovLinearARD self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_Khess_param", _wrap_CCovLinearARD_Khess_param, METH_VARARGS, (char *)"\n"
		"CCovLinearARD_Khess_param(CCovLinearARD self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_Kcross_grad_X", _wrap_CCovLinearARD_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CCovLinearARD_Kcross_grad_X(CCovLinearARD self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_Kdiag_grad_X", _wrap_CCovLinearARD_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CCovLinearARD_Kdiag_grad_X(CCovLinearARD self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_getName", _wrap_CCovLinearARD_getName, METH_VARARGS, (char *)"\n"
		"CCovLinearARD_getName(CCovLinearARD self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearARD const *\n"
		"\n"
		""},
	 { (char *)"CCovLinearARD_swigregister", CCovLinearARD_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_CCovLinearISODelta", _wrap_delete_CCovLinearISODelta, METH_VARARGS, (char *)"\n"
		"delete_CCovLinearISODelta(CCovLinearISODelta self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISODelta *\n"
		"\n"
		""},
	 { (char *)"CCovLinearISODelta_Kcross", _wrap_CCovLinearISODelta_Kcross, METH_VARARGS, (char *)"\n"
		"CCovLinearISODelta_Kcross(CCovLinearISODelta self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISODelta const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CCovLinearISODelta_Kcross_diag", _wrap_CCovLinearISODelta_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CCovLinearISODelta_Kcross_diag(CCovLinearISODelta self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISODelta const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CCovLinearISODelta_Kgrad_param", _wrap_CCovLinearISODelta_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CCovLinearISODelta_Kgrad_param(CCovLinearISODelta self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISODelta const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearISODelta_Khess_param", _wrap_CCovLinearISODelta_Khess_param, METH_VARARGS, (char *)"\n"
		"CCovLinearISODelta_Khess_param(CCovLinearISODelta self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISODelta const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovLinearISODelta_getName", _wrap_CCovLinearISODelta_getName, METH_VARARGS, (char *)"\n"
		"CCovLinearISODelta_getName(CCovLinearISODelta self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovLinearISODelta const *\n"
		"\n"
		""},
	 { (char *)"CCovLinearISODelta_swigregister", CCovLinearISODelta_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CFreeFormCF", _wrap_new_CFreeFormCF, METH_VARARGS, (char *)"\n"
		"new_CFreeFormCF(limix::muint_t numberGroups) -> CFreeFormCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberGroups: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"delete_CFreeFormCF", _wrap_delete_CFreeFormCF, METH_VARARGS, (char *)"\n"
		"delete_CFreeFormCF(CFreeFormCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF *\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_setX", _wrap_CFreeFormCF_setX, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_setX(CFreeFormCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_setXcol", _wrap_CFreeFormCF_setXcol, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_setXcol(CFreeFormCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_Kcross_diag", _wrap_CFreeFormCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_Kcross_diag(CFreeFormCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_Kcross_grad_X", _wrap_CFreeFormCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_Kcross_grad_X(CFreeFormCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_Kdiag_grad_X", _wrap_CFreeFormCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_Kdiag_grad_X(CFreeFormCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_Kdim", _wrap_CFreeFormCF_Kdim, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_Kdim(CFreeFormCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_agetScales", _wrap_CFreeFormCF_agetScales, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_agetScales(CFreeFormCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF *\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_setParamsCovariance", _wrap_CFreeFormCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_setParamsCovariance(CFreeFormCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_Kcross", _wrap_CFreeFormCF_Kcross, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_Kcross(CFreeFormCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_Kgrad_param", _wrap_CFreeFormCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_Kgrad_param(CFreeFormCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_Khess_param", _wrap_CFreeFormCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_Khess_param(CFreeFormCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_agetParamMask0", _wrap_CFreeFormCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_agetParamMask0(CFreeFormCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_getName", _wrap_CFreeFormCF_getName, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_getName(CFreeFormCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_setParamsVarCorr", _wrap_CFreeFormCF_setParamsVarCorr, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_setParamsVarCorr(CFreeFormCF self, limix::CovarParams const & paramsVC)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF *\n"
		"paramsVC: limix::CovarParams const &\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_agetL0", _wrap_CFreeFormCF_agetL0, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_agetL0(CFreeFormCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_agetL0grad_param", _wrap_CFreeFormCF_agetL0grad_param, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_agetL0grad_param(CFreeFormCF self, limix::muint_t i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"i: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_getIparamDiag", _wrap_CFreeFormCF_getIparamDiag, METH_VARARGS, (char *)"\n"
		"CFreeFormCF_getIparamDiag(CFreeFormCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFreeFormCF const *\n"
		"\n"
		""},
	 { (char *)"CFreeFormCF_swigregister", CFreeFormCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CRankOneCF", _wrap_new_CRankOneCF, METH_VARARGS, (char *)"\n"
		"new_CRankOneCF(limix::muint_t numberGroups) -> CRankOneCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberGroups: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"delete_CRankOneCF", _wrap_delete_CRankOneCF, METH_VARARGS, (char *)"\n"
		"delete_CRankOneCF(CRankOneCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF *\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_setX", _wrap_CRankOneCF_setX, METH_VARARGS, (char *)"\n"
		"CRankOneCF_setX(CRankOneCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_setXcol", _wrap_CRankOneCF_setXcol, METH_VARARGS, (char *)"\n"
		"CRankOneCF_setXcol(CRankOneCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_Kcross_diag", _wrap_CRankOneCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CRankOneCF_Kcross_diag(CRankOneCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_Kcross_grad_X", _wrap_CRankOneCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CRankOneCF_Kcross_grad_X(CRankOneCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_Kdiag_grad_X", _wrap_CRankOneCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CRankOneCF_Kdiag_grad_X(CRankOneCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_Kdim", _wrap_CRankOneCF_Kdim, METH_VARARGS, (char *)"\n"
		"CRankOneCF_Kdim(CRankOneCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_agetScales", _wrap_CRankOneCF_agetScales, METH_VARARGS, (char *)"\n"
		"CRankOneCF_agetScales(CRankOneCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF *\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_setParamsCovariance", _wrap_CRankOneCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CRankOneCF_setParamsCovariance(CRankOneCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_Kcross", _wrap_CRankOneCF_Kcross, METH_VARARGS, (char *)"\n"
		"CRankOneCF_Kcross(CRankOneCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_Kgrad_param", _wrap_CRankOneCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CRankOneCF_Kgrad_param(CRankOneCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_Khess_param", _wrap_CRankOneCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CRankOneCF_Khess_param(CRankOneCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_agetParamMask0", _wrap_CRankOneCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CRankOneCF_agetParamMask0(CRankOneCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_getName", _wrap_CRankOneCF_getName, METH_VARARGS, (char *)"\n"
		"CRankOneCF_getName(CRankOneCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRankOneCF const *\n"
		"\n"
		""},
	 { (char *)"CRankOneCF_swigregister", CRankOneCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CLowRankCF", _wrap_new_CLowRankCF, METH_VARARGS, (char *)"\n"
		"new_CLowRankCF(limix::muint_t numberGroups, limix::muint_t rank) -> CLowRankCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberGroups: limix::muint_t\n"
		"rank: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"delete_CLowRankCF", _wrap_delete_CLowRankCF, METH_VARARGS, (char *)"\n"
		"delete_CLowRankCF(CLowRankCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF *\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_setX", _wrap_CLowRankCF_setX, METH_VARARGS, (char *)"\n"
		"CLowRankCF_setX(CLowRankCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_setXcol", _wrap_CLowRankCF_setXcol, METH_VARARGS, (char *)"\n"
		"CLowRankCF_setXcol(CLowRankCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_Kcross_diag", _wrap_CLowRankCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CLowRankCF_Kcross_diag(CLowRankCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_Kcross_grad_X", _wrap_CLowRankCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CLowRankCF_Kcross_grad_X(CLowRankCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_Kdiag_grad_X", _wrap_CLowRankCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CLowRankCF_Kdiag_grad_X(CLowRankCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_Kdim", _wrap_CLowRankCF_Kdim, METH_VARARGS, (char *)"\n"
		"CLowRankCF_Kdim(CLowRankCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_agetScales", _wrap_CLowRankCF_agetScales, METH_VARARGS, (char *)"\n"
		"CLowRankCF_agetScales(CLowRankCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF *\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_setParamsCovariance", _wrap_CLowRankCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CLowRankCF_setParamsCovariance(CLowRankCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_Kcross", _wrap_CLowRankCF_Kcross, METH_VARARGS, (char *)"\n"
		"CLowRankCF_Kcross(CLowRankCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_Kgrad_param", _wrap_CLowRankCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CLowRankCF_Kgrad_param(CLowRankCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_Khess_param", _wrap_CLowRankCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CLowRankCF_Khess_param(CLowRankCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_agetParamMask0", _wrap_CLowRankCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CLowRankCF_agetParamMask0(CLowRankCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_getName", _wrap_CLowRankCF_getName, METH_VARARGS, (char *)"\n"
		"CLowRankCF_getName(CLowRankCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLowRankCF const *\n"
		"\n"
		""},
	 { (char *)"CLowRankCF_swigregister", CLowRankCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CFixedCF", _wrap_new_CFixedCF, METH_VARARGS, (char *)"\n"
		"new_CFixedCF(MatrixXd const & K0) -> CFixedCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"delete_CFixedCF", _wrap_delete_CFixedCF, METH_VARARGS, (char *)"\n"
		"delete_CFixedCF(CFixedCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_agetScales", _wrap_CFixedCF_agetScales, METH_VARARGS, (char *)"\n"
		"CFixedCF_agetScales(CFixedCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_setParamsCovariance", _wrap_CFixedCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CFixedCF_setParamsCovariance(CFixedCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CFixedCF_Kcross", _wrap_CFixedCF_Kcross, METH_VARARGS, (char *)"\n"
		"CFixedCF_Kcross(CFixedCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CFixedCF_Kcross_diag", _wrap_CFixedCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CFixedCF_Kcross_diag(CFixedCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CFixedCF_Kgrad_param", _wrap_CFixedCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CFixedCF_Kgrad_param(CFixedCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFixedCF_Khess_param", _wrap_CFixedCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CFixedCF_Khess_param(CFixedCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFixedCF_Kcross_grad_X", _wrap_CFixedCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CFixedCF_Kcross_grad_X(CFixedCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFixedCF_Kdiag_grad_X", _wrap_CFixedCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CFixedCF_Kdiag_grad_X(CFixedCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFixedCF_K", _wrap_CFixedCF_K, METH_VARARGS, (char *)"\n"
		"CFixedCF_K(CFixedCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_Kdim", _wrap_CFixedCF_Kdim, METH_VARARGS, (char *)"\n"
		"CFixedCF_Kdim(CFixedCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_agetParamMask0", _wrap_CFixedCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CFixedCF_agetParamMask0(CFixedCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_setK0", _wrap_CFixedCF_setK0, METH_VARARGS, (char *)"\n"
		"CFixedCF_setK0(CFixedCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CFixedCF_setK0cross", _wrap_CFixedCF_setK0cross, METH_VARARGS, (char *)"\n"
		"CFixedCF_setK0cross(CFixedCF self, MatrixXd const & Kcross)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF *\n"
		"Kcross: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CFixedCF_agetK0", _wrap_CFixedCF_agetK0, METH_VARARGS, (char *)"\n"
		"CFixedCF_agetK0(CFixedCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_agetK0cross", _wrap_CFixedCF_agetK0cross, METH_VARARGS, (char *)"\n"
		"CFixedCF_agetK0cross(CFixedCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_setK0cross_diag", _wrap_CFixedCF_setK0cross_diag, METH_VARARGS, (char *)"\n"
		"CFixedCF_setK0cross_diag(CFixedCF self, VectorXd const & Kcross_diag)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF *\n"
		"Kcross_diag: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CFixedCF_agetK0cross_diag", _wrap_CFixedCF_agetK0cross_diag, METH_VARARGS, (char *)"\n"
		"CFixedCF_agetK0cross_diag(CFixedCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_getName", _wrap_CFixedCF_getName, METH_VARARGS, (char *)"\n"
		"CFixedCF_getName(CFixedCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedCF_swigregister", CFixedCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CDiagonalCF", _wrap_new_CDiagonalCF, METH_VARARGS, (char *)"\n"
		"new_CDiagonalCF(limix::muint_t numberGroups) -> CDiagonalCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberGroups: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"delete_CDiagonalCF", _wrap_delete_CDiagonalCF, METH_VARARGS, (char *)"\n"
		"delete_CDiagonalCF(CDiagonalCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF *\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_setX", _wrap_CDiagonalCF_setX, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_setX(CDiagonalCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_setXcol", _wrap_CDiagonalCF_setXcol, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_setXcol(CDiagonalCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_Kcross_diag", _wrap_CDiagonalCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_Kcross_diag(CDiagonalCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_Kcross_grad_X", _wrap_CDiagonalCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_Kcross_grad_X(CDiagonalCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_Kdiag_grad_X", _wrap_CDiagonalCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_Kdiag_grad_X(CDiagonalCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_agetScales", _wrap_CDiagonalCF_agetScales, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_agetScales(CDiagonalCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF *\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_setParamsCovariance", _wrap_CDiagonalCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_setParamsCovariance(CDiagonalCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_Kdim", _wrap_CDiagonalCF_Kdim, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_Kdim(CDiagonalCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_Kcross", _wrap_CDiagonalCF_Kcross, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_Kcross(CDiagonalCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_Kgrad_param", _wrap_CDiagonalCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_Kgrad_param(CDiagonalCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_Khess_param", _wrap_CDiagonalCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_Khess_param(CDiagonalCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_agetParamMask0", _wrap_CDiagonalCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_agetParamMask0(CDiagonalCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_getName", _wrap_CDiagonalCF_getName, METH_VARARGS, (char *)"\n"
		"CDiagonalCF_getName(CDiagonalCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CDiagonalCF const *\n"
		"\n"
		""},
	 { (char *)"CDiagonalCF_swigregister", CDiagonalCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CRank1diagCF", _wrap_new_CRank1diagCF, METH_VARARGS, (char *)"\n"
		"new_CRank1diagCF(limix::muint_t numberGroups) -> CRank1diagCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberGroups: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"delete_CRank1diagCF", _wrap_delete_CRank1diagCF, METH_VARARGS, (char *)"\n"
		"delete_CRank1diagCF(CRank1diagCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF *\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_setX", _wrap_CRank1diagCF_setX, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_setX(CRank1diagCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_setXcol", _wrap_CRank1diagCF_setXcol, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_setXcol(CRank1diagCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_Kcross_diag", _wrap_CRank1diagCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_Kcross_diag(CRank1diagCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_Kcross_grad_X", _wrap_CRank1diagCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_Kcross_grad_X(CRank1diagCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_Kdiag_grad_X", _wrap_CRank1diagCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_Kdiag_grad_X(CRank1diagCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_agetScales", _wrap_CRank1diagCF_agetScales, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_agetScales(CRank1diagCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF *\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_setParamsCovariance", _wrap_CRank1diagCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_setParamsCovariance(CRank1diagCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_Kdim", _wrap_CRank1diagCF_Kdim, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_Kdim(CRank1diagCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_agetRank1", _wrap_CRank1diagCF_agetRank1, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_agetRank1(CRank1diagCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_agetDiag", _wrap_CRank1diagCF_agetDiag, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_agetDiag(CRank1diagCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_Kcross", _wrap_CRank1diagCF_Kcross, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_Kcross(CRank1diagCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_Kgrad_param", _wrap_CRank1diagCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_Kgrad_param(CRank1diagCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_Khess_param", _wrap_CRank1diagCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_Khess_param(CRank1diagCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_agetParamMask0", _wrap_CRank1diagCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_agetParamMask0(CRank1diagCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_getName", _wrap_CRank1diagCF_getName, METH_VARARGS, (char *)"\n"
		"CRank1diagCF_getName(CRank1diagCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRank1diagCF const *\n"
		"\n"
		""},
	 { (char *)"CRank1diagCF_swigregister", CRank1diagCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CSqExpCF", _wrap_new_CSqExpCF, METH_VARARGS, (char *)"\n"
		"new_CSqExpCF(limix::muint_t numberGroups, limix::muint_t dim) -> CSqExpCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberGroups: limix::muint_t\n"
		"dim: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"delete_CSqExpCF", _wrap_delete_CSqExpCF, METH_VARARGS, (char *)"\n"
		"delete_CSqExpCF(CSqExpCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF *\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_setX", _wrap_CSqExpCF_setX, METH_VARARGS, (char *)"\n"
		"CSqExpCF_setX(CSqExpCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_setXcol", _wrap_CSqExpCF_setXcol, METH_VARARGS, (char *)"\n"
		"CSqExpCF_setXcol(CSqExpCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_Kcross_diag", _wrap_CSqExpCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CSqExpCF_Kcross_diag(CSqExpCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_Kcross_grad_X", _wrap_CSqExpCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CSqExpCF_Kcross_grad_X(CSqExpCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_Kdiag_grad_X", _wrap_CSqExpCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CSqExpCF_Kdiag_grad_X(CSqExpCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_agetScales", _wrap_CSqExpCF_agetScales, METH_VARARGS, (char *)"\n"
		"CSqExpCF_agetScales(CSqExpCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF *\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_setParamsCovariance", _wrap_CSqExpCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CSqExpCF_setParamsCovariance(CSqExpCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_Kdim", _wrap_CSqExpCF_Kdim, METH_VARARGS, (char *)"\n"
		"CSqExpCF_Kdim(CSqExpCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_Kcross", _wrap_CSqExpCF_Kcross, METH_VARARGS, (char *)"\n"
		"CSqExpCF_Kcross(CSqExpCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_Kgrad_param", _wrap_CSqExpCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CSqExpCF_Kgrad_param(CSqExpCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_Khess_param", _wrap_CSqExpCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CSqExpCF_Khess_param(CSqExpCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_agetParamMask0", _wrap_CSqExpCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CSqExpCF_agetParamMask0(CSqExpCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_getName", _wrap_CSqExpCF_getName, METH_VARARGS, (char *)"\n"
		"CSqExpCF_getName(CSqExpCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSqExpCF const *\n"
		"\n"
		""},
	 { (char *)"CSqExpCF_swigregister", CSqExpCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CFixedDiagonalCF", _wrap_new_CFixedDiagonalCF, METH_VARARGS, (char *)"\n"
		"new_CFixedDiagonalCF(limix::PCovarianceFunction covar, VectorXd const & d) -> CFixedDiagonalCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::PCovarianceFunction\n"
		"d: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"delete_CFixedDiagonalCF", _wrap_delete_CFixedDiagonalCF, METH_VARARGS, (char *)"\n"
		"delete_CFixedDiagonalCF(CFixedDiagonalCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF *\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_setParams", _wrap_CFixedDiagonalCF_setParams, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_setParams(CFixedDiagonalCF self, limix::CovarParams const & params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF *\n"
		"params: limix::CovarParams const &\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_getParams", _wrap_CFixedDiagonalCF_getParams, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_getParams(CFixedDiagonalCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_setX", _wrap_CFixedDiagonalCF_setX, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_setX(CFixedDiagonalCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_setXcol", _wrap_CFixedDiagonalCF_setXcol, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_setXcol(CFixedDiagonalCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_Kcross_diag", _wrap_CFixedDiagonalCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_Kcross_diag(CFixedDiagonalCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_Kcross_grad_X", _wrap_CFixedDiagonalCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_Kcross_grad_X(CFixedDiagonalCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_Kdiag_grad_X", _wrap_CFixedDiagonalCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_Kdiag_grad_X(CFixedDiagonalCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_agetScales", _wrap_CFixedDiagonalCF_agetScales, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_agetScales(CFixedDiagonalCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF *\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_setParamsCovariance", _wrap_CFixedDiagonalCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_setParamsCovariance(CFixedDiagonalCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_Kdim", _wrap_CFixedDiagonalCF_Kdim, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_Kdim(CFixedDiagonalCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_Kcross", _wrap_CFixedDiagonalCF_Kcross, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_Kcross(CFixedDiagonalCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_Kgrad_param", _wrap_CFixedDiagonalCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_Kgrad_param(CFixedDiagonalCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_Khess_param", _wrap_CFixedDiagonalCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_Khess_param(CFixedDiagonalCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_agetParamMask0", _wrap_CFixedDiagonalCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_agetParamMask0(CFixedDiagonalCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_getName", _wrap_CFixedDiagonalCF_getName, METH_VARARGS, (char *)"\n"
		"CFixedDiagonalCF_getName(CFixedDiagonalCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CFixedDiagonalCF const *\n"
		"\n"
		""},
	 { (char *)"CFixedDiagonalCF_swigregister", CFixedDiagonalCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CPolyCF", _wrap_new_CPolyCF, METH_VARARGS, (char *)"\n"
		"new_CPolyCF(limix::muint_t numberGroups, limix::muint_t n_dims, limix::muint_t order) -> CPolyCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberGroups: limix::muint_t\n"
		"n_dims: limix::muint_t\n"
		"order: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"delete_CPolyCF", _wrap_delete_CPolyCF, METH_VARARGS, (char *)"\n"
		"delete_CPolyCF(CPolyCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF *\n"
		"\n"
		""},
	 { (char *)"CPolyCF_setX", _wrap_CPolyCF_setX, METH_VARARGS, (char *)"\n"
		"CPolyCF_setX(CPolyCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CPolyCF_setXcol", _wrap_CPolyCF_setXcol, METH_VARARGS, (char *)"\n"
		"CPolyCF_setXcol(CPolyCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CPolyCF_Kcross_diag", _wrap_CPolyCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CPolyCF_Kcross_diag(CPolyCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CPolyCF_Kcross_grad_X", _wrap_CPolyCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CPolyCF_Kcross_grad_X(CPolyCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CPolyCF_Kdiag_grad_X", _wrap_CPolyCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CPolyCF_Kdiag_grad_X(CPolyCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CPolyCF_Kdim", _wrap_CPolyCF_Kdim, METH_VARARGS, (char *)"\n"
		"CPolyCF_Kdim(CPolyCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"\n"
		""},
	 { (char *)"CPolyCF_agetScales", _wrap_CPolyCF_agetScales, METH_VARARGS, (char *)"\n"
		"CPolyCF_agetScales(CPolyCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF *\n"
		"\n"
		""},
	 { (char *)"CPolyCF_setParamsCovariance", _wrap_CPolyCF_setParamsCovariance, METH_VARARGS, (char *)"\n"
		"CPolyCF_setParamsCovariance(CPolyCF self, MatrixXd const & K0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF *\n"
		"K0: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CPolyCF_Kcross", _wrap_CPolyCF_Kcross, METH_VARARGS, (char *)"\n"
		"CPolyCF_Kcross(CPolyCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CPolyCF_Kgrad_param", _wrap_CPolyCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CPolyCF_Kgrad_param(CPolyCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CPolyCF_Khess_param", _wrap_CPolyCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CPolyCF_Khess_param(CPolyCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CPolyCF_agetParamMask0", _wrap_CPolyCF_agetParamMask0, METH_VARARGS, (char *)"\n"
		"CPolyCF_agetParamMask0(CPolyCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"\n"
		""},
	 { (char *)"CPolyCF_getName", _wrap_CPolyCF_getName, METH_VARARGS, (char *)"\n"
		"CPolyCF_getName(CPolyCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CPolyCF const *\n"
		"\n"
		""},
	 { (char *)"CPolyCF_swigregister", CPolyCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CCovSqexpARD", _wrap_new_CCovSqexpARD, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD(limix::muint_t numberDimensions=1)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numberDimensions: limix::muint_t\n"
		"\n"
		"new_CCovSqexpARD() -> CCovSqexpARD\n"
		""},
	 { (char *)"delete_CCovSqexpARD", _wrap_delete_CCovSqexpARD, METH_VARARGS, (char *)"\n"
		"delete_CCovSqexpARD(CCovSqexpARD self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD *\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_setNumberDimensions", _wrap_CCovSqexpARD_setNumberDimensions, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD_setNumberDimensions(CCovSqexpARD self, limix::muint_t numberDimensions)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD *\n"
		"numberDimensions: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_Kcross", _wrap_CCovSqexpARD_Kcross, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD_Kcross(CCovSqexpARD self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_Kcross_diag", _wrap_CCovSqexpARD_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD_Kcross_diag(CCovSqexpARD self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_Kgrad_param", _wrap_CCovSqexpARD_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD_Kgrad_param(CCovSqexpARD self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_Khess_param", _wrap_CCovSqexpARD_Khess_param, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD_Khess_param(CCovSqexpARD self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_Kcross_grad_X", _wrap_CCovSqexpARD_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD_Kcross_grad_X(CCovSqexpARD self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_Kdiag_grad_X", _wrap_CCovSqexpARD_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD_Kdiag_grad_X(CCovSqexpARD self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_getName", _wrap_CCovSqexpARD_getName, METH_VARARGS, (char *)"\n"
		"CCovSqexpARD_getName(CCovSqexpARD self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CCovSqexpARD const *\n"
		"\n"
		""},
	 { (char *)"CCovSqexpARD_swigregister", CCovSqexpARD_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_AMultiCF", _wrap_delete_AMultiCF, METH_VARARGS, (char *)"\n"
		"delete_AMultiCF(AMultiCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_Kdim", _wrap_AMultiCF_Kdim, METH_VARARGS, (char *)"\n"
		"AMultiCF_Kdim(AMultiCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF const *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_addSyncChild", _wrap_AMultiCF_addSyncChild, METH_VARARGS, (char *)"\n"
		"AMultiCF_addSyncChild(AMultiCF self, limix::Pbool l)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"l: limix::Pbool\n"
		"\n"
		""},
	 { (char *)"AMultiCF_delSyncChild", _wrap_AMultiCF_delSyncChild, METH_VARARGS, (char *)"\n"
		"AMultiCF_delSyncChild(AMultiCF self, limix::Pbool l)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"l: limix::Pbool\n"
		"\n"
		""},
	 { (char *)"AMultiCF_addCovariance", _wrap_AMultiCF_addCovariance, METH_VARARGS, (char *)"\n"
		"AMultiCF_addCovariance(AMultiCF self, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"AMultiCF_setCovariance", _wrap_AMultiCF_setCovariance, METH_VARARGS, (char *)"\n"
		"AMultiCF_setCovariance(AMultiCF self, limix::muint_t i, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"i: limix::muint_t\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"AMultiCF_getCovariance", _wrap_AMultiCF_getCovariance, METH_VARARGS, (char *)"\n"
		"AMultiCF_getCovariance(AMultiCF self, limix::muint_t i) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"i: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"AMultiCF_getNumberDimensions", _wrap_AMultiCF_getNumberDimensions, METH_VARARGS, (char *)"\n"
		"AMultiCF_getNumberDimensions(AMultiCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF const *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_setNumberDimensions", _wrap_AMultiCF_setNumberDimensions, METH_VARARGS, (char *)"\n"
		"AMultiCF_setNumberDimensions(AMultiCF self, limix::muint_t numberDimensions)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"numberDimensions: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"AMultiCF_getNumberParams", _wrap_AMultiCF_getNumberParams, METH_VARARGS, (char *)"\n"
		"AMultiCF_getNumberParams(AMultiCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF const *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_setX", _wrap_AMultiCF_setX, METH_VARARGS, (char *)"\n"
		"AMultiCF_setX(AMultiCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"AMultiCF_getX", _wrap_AMultiCF_getX, METH_VARARGS, (char *)"\n"
		"AMultiCF_getX(AMultiCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF const *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_setXcol", _wrap_AMultiCF_setXcol, METH_VARARGS, (char *)"\n"
		"AMultiCF_setXcol(AMultiCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"AMultiCF_setParams", _wrap_AMultiCF_setParams, METH_VARARGS, (char *)"\n"
		"AMultiCF_setParams(AMultiCF self, limix::CovarParams const & params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"params: limix::CovarParams const &\n"
		"\n"
		""},
	 { (char *)"AMultiCF_getParams", _wrap_AMultiCF_getParams, METH_VARARGS, (char *)"\n"
		"AMultiCF_getParams(AMultiCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF const *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_getParamMask", _wrap_AMultiCF_getParamMask, METH_VARARGS, (char *)"\n"
		"AMultiCF_getParamMask(AMultiCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF const *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_setParamMask", _wrap_AMultiCF_setParamMask, METH_VARARGS, (char *)"\n"
		"AMultiCF_setParamMask(AMultiCF self, limix::CovarParams const & params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"params: limix::CovarParams const &\n"
		"\n"
		""},
	 { (char *)"AMultiCF_getParamBounds0", _wrap_AMultiCF_getParamBounds0, METH_VARARGS, (char *)"\n"
		"AMultiCF_getParamBounds0(AMultiCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF const *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_getParamBounds", _wrap_AMultiCF_getParamBounds, METH_VARARGS, (char *)"\n"
		"AMultiCF_getParamBounds(AMultiCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF const *\n"
		"\n"
		""},
	 { (char *)"AMultiCF_setParamBounds", _wrap_AMultiCF_setParamBounds, METH_VARARGS, (char *)"\n"
		"AMultiCF_setParamBounds(AMultiCF self, limix::CovarParams const & lower, limix::CovarParams const & upper)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AMultiCF *\n"
		"lower: limix::CovarParams const &\n"
		"upper: limix::CovarParams const &\n"
		"\n"
		""},
	 { (char *)"AMultiCF_swigregister", AMultiCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CSumCF", _wrap_new_CSumCF, METH_VARARGS, (char *)"\n"
		"CSumCF(limix::ACovarVec const & covariances)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covariances: limix::ACovarVec const &\n"
		"\n"
		"CSumCF(limix::muint_t const numCovariances=0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numCovariances: limix::muint_t const\n"
		"\n"
		"new_CSumCF() -> CSumCF\n"
		""},
	 { (char *)"delete_CSumCF", _wrap_delete_CSumCF, METH_VARARGS, (char *)"\n"
		"delete_CSumCF(CSumCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF *\n"
		"\n"
		""},
	 { (char *)"CSumCF_Kcross", _wrap_CSumCF_Kcross, METH_VARARGS, (char *)"\n"
		"CSumCF_Kcross(CSumCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CSumCF_Kcross_diag", _wrap_CSumCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CSumCF_Kcross_diag(CSumCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CSumCF_Kgrad_param", _wrap_CSumCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CSumCF_Kgrad_param(CSumCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSumCF_Khess_param", _wrap_CSumCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CSumCF_Khess_param(CSumCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSumCF_Kcross_grad_X", _wrap_CSumCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CSumCF_Kcross_grad_X(CSumCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSumCF_Kdiag_grad_X", _wrap_CSumCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CSumCF_Kdiag_grad_X(CSumCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSumCF_K", _wrap_CSumCF_K, METH_VARARGS, (char *)"\n"
		"CSumCF_K(CSumCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"\n"
		""},
	 { (char *)"CSumCF_Kdiag", _wrap_CSumCF_Kdiag, METH_VARARGS, (char *)"\n"
		"CSumCF_Kdiag(CSumCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"\n"
		""},
	 { (char *)"CSumCF_Kgrad_X", _wrap_CSumCF_Kgrad_X, METH_VARARGS, (char *)"\n"
		"CSumCF_Kgrad_X(CSumCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CSumCF_getName", _wrap_CSumCF_getName, METH_VARARGS, (char *)"\n"
		"CSumCF_getName(CSumCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumCF const *\n"
		"\n"
		""},
	 { (char *)"CSumCF_swigregister", CSumCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CLinCombCF", _wrap_new_CLinCombCF, METH_VARARGS, (char *)"\n"
		"CLinCombCF(limix::ACovarVec const & covariances)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covariances: limix::ACovarVec const &\n"
		"\n"
		"CLinCombCF(limix::muint_t const numCovariances=0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numCovariances: limix::muint_t const\n"
		"\n"
		"new_CLinCombCF() -> CLinCombCF\n"
		""},
	 { (char *)"delete_CLinCombCF", _wrap_delete_CLinCombCF, METH_VARARGS, (char *)"\n"
		"delete_CLinCombCF(CLinCombCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF *\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_setCoeff", _wrap_CLinCombCF_setCoeff, METH_VARARGS, (char *)"\n"
		"CLinCombCF_setCoeff(CLinCombCF self, VectorXd const & coeff)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF *\n"
		"coeff: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_agetCoeff", _wrap_CLinCombCF_agetCoeff, METH_VARARGS, (char *)"\n"
		"CLinCombCF_agetCoeff(CLinCombCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_Kcross", _wrap_CLinCombCF_Kcross, METH_VARARGS, (char *)"\n"
		"CLinCombCF_Kcross(CLinCombCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_Kcross_diag", _wrap_CLinCombCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CLinCombCF_Kcross_diag(CLinCombCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_Kgrad_param", _wrap_CLinCombCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CLinCombCF_Kgrad_param(CLinCombCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_Khess_param", _wrap_CLinCombCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CLinCombCF_Khess_param(CLinCombCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_Kcross_grad_X", _wrap_CLinCombCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CLinCombCF_Kcross_grad_X(CLinCombCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_Kdiag_grad_X", _wrap_CLinCombCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CLinCombCF_Kdiag_grad_X(CLinCombCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_K", _wrap_CLinCombCF_K, METH_VARARGS, (char *)"\n"
		"CLinCombCF_K(CLinCombCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_Kdiag", _wrap_CLinCombCF_Kdiag, METH_VARARGS, (char *)"\n"
		"CLinCombCF_Kdiag(CLinCombCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_Kgrad_X", _wrap_CLinCombCF_Kgrad_X, METH_VARARGS, (char *)"\n"
		"CLinCombCF_Kgrad_X(CLinCombCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_getName", _wrap_CLinCombCF_getName, METH_VARARGS, (char *)"\n"
		"CLinCombCF_getName(CLinCombCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinCombCF const *\n"
		"\n"
		""},
	 { (char *)"CLinCombCF_swigregister", CLinCombCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CProductCF", _wrap_new_CProductCF, METH_VARARGS, (char *)"\n"
		"CProductCF(limix::ACovarVec const & covariances)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covariances: limix::ACovarVec const &\n"
		"\n"
		"CProductCF(limix::muint_t const numCovariances=0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"numCovariances: limix::muint_t const\n"
		"\n"
		"new_CProductCF() -> CProductCF\n"
		""},
	 { (char *)"delete_CProductCF", _wrap_delete_CProductCF, METH_VARARGS, (char *)"\n"
		"delete_CProductCF(CProductCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF *\n"
		"\n"
		""},
	 { (char *)"CProductCF_Kcross", _wrap_CProductCF_Kcross, METH_VARARGS, (char *)"\n"
		"CProductCF_Kcross(CProductCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CProductCF_Kcross_diag", _wrap_CProductCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CProductCF_Kcross_diag(CProductCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CProductCF_Kgrad_param", _wrap_CProductCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CProductCF_Kgrad_param(CProductCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CProductCF_Khess_param", _wrap_CProductCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CProductCF_Khess_param(CProductCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CProductCF_Kcross_grad_X", _wrap_CProductCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CProductCF_Kcross_grad_X(CProductCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CProductCF_Kdiag_grad_X", _wrap_CProductCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CProductCF_Kdiag_grad_X(CProductCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CProductCF_K", _wrap_CProductCF_K, METH_VARARGS, (char *)"\n"
		"CProductCF_K(CProductCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"\n"
		""},
	 { (char *)"CProductCF_Kdiag", _wrap_CProductCF_Kdiag, METH_VARARGS, (char *)"\n"
		"CProductCF_Kdiag(CProductCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"\n"
		""},
	 { (char *)"CProductCF_Kgrad_X", _wrap_CProductCF_Kgrad_X, METH_VARARGS, (char *)"\n"
		"CProductCF_Kgrad_X(CProductCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CProductCF_getName", _wrap_CProductCF_getName, METH_VARARGS, (char *)"\n"
		"CProductCF_getName(CProductCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CProductCF const *\n"
		"\n"
		""},
	 { (char *)"CProductCF_swigregister", CProductCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CKroneckerCF", _wrap_new_CKroneckerCF, METH_VARARGS, (char *)"\n"
		"CKroneckerCF()\n"
		"new_CKroneckerCF(limix::PCovarianceFunction col, limix::PCovarianceFunction row) -> CKroneckerCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"col: limix::PCovarianceFunction\n"
		"row: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"delete_CKroneckerCF", _wrap_delete_CKroneckerCF, METH_VARARGS, (char *)"\n"
		"delete_CKroneckerCF(CKroneckerCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Kdim", _wrap_CKroneckerCF_Kdim, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Kdim(CKroneckerCF self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_setRowCovariance", _wrap_CKroneckerCF_setRowCovariance, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_setRowCovariance(CKroneckerCF self, limix::PCovarianceFunction cov)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"cov: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_setColCovariance", _wrap_CKroneckerCF_setColCovariance, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_setColCovariance(CKroneckerCF self, limix::PCovarianceFunction cov)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"cov: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_getRowCovariance", _wrap_CKroneckerCF_getRowCovariance, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_getRowCovariance(CKroneckerCF self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_getColCovariance", _wrap_CKroneckerCF_getColCovariance, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_getColCovariance(CKroneckerCF self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_setKroneckerIndicator", _wrap_CKroneckerCF_setKroneckerIndicator, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_setKroneckerIndicator(CKroneckerCF self, MatrixXi const & kroneckerIndicator)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"kroneckerIndicator: MatrixXi const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_getKroneckerIndicator", _wrap_CKroneckerCF_getKroneckerIndicator, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_getKroneckerIndicator(CKroneckerCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_isKronecker", _wrap_CKroneckerCF_isKronecker, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_isKronecker(CKroneckerCF self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_setX", _wrap_CKroneckerCF_setX, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_setX(CKroneckerCF self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_getX", _wrap_CKroneckerCF_getX, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_getX(CKroneckerCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_setXcol", _wrap_CKroneckerCF_setXcol, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_setXcol(CKroneckerCF self, limix::CovarInput const & X, limix::muint_t col)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"X: limix::CovarInput const &\n"
		"col: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_setXr", _wrap_CKroneckerCF_setXr, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_setXr(CKroneckerCF self, limix::CovarInput const & Xr)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"Xr: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_setXc", _wrap_CKroneckerCF_setXc, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_setXc(CKroneckerCF self, limix::CovarInput const & Xc)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF *\n"
		"Xc: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Kcross", _wrap_CKroneckerCF_Kcross, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Kcross(CKroneckerCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Kcross_diag", _wrap_CKroneckerCF_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Kcross_diag(CKroneckerCF self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Kgrad_param", _wrap_CKroneckerCF_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Kgrad_param(CKroneckerCF self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Khess_param", _wrap_CKroneckerCF_Khess_param, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Khess_param(CKroneckerCF self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Kcross_grad_X", _wrap_CKroneckerCF_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Kcross_grad_X(CKroneckerCF self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Kdiag_grad_X", _wrap_CKroneckerCF_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Kdiag_grad_X(CKroneckerCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_K", _wrap_CKroneckerCF_K, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_K(CKroneckerCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Kdiag", _wrap_CKroneckerCF_Kdiag, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Kdiag(CKroneckerCF self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_Kgrad_X", _wrap_CKroneckerCF_Kgrad_X, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_Kgrad_X(CKroneckerCF self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_getName", _wrap_CKroneckerCF_getName, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_getName(CKroneckerCF self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerCF const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_createKroneckerIndex", _wrap_CKroneckerCF_createKroneckerIndex, METH_VARARGS, (char *)"\n"
		"CKroneckerCF_createKroneckerIndex(limix::muint_t Ncols, limix::muint_t Nrows)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Ncols: limix::muint_t\n"
		"Nrows: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CKroneckerCF_swigregister", CKroneckerCF_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_ALikelihood", _wrap_delete_ALikelihood, METH_VARARGS, (char *)"\n"
		"delete_ALikelihood(ALikelihood self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALikelihood *\n"
		"\n"
		""},
	 { (char *)"ALikelihood_Kcross", _wrap_ALikelihood_Kcross, METH_VARARGS, (char *)"\n"
		"ALikelihood_Kcross(ALikelihood self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALikelihood const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"ALikelihood_Kcross_diag", _wrap_ALikelihood_Kcross_diag, METH_VARARGS, (char *)"\n"
		"ALikelihood_Kcross_diag(ALikelihood self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALikelihood const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"ALikelihood_Kcross_grad_X", _wrap_ALikelihood_Kcross_grad_X, METH_VARARGS, (char *)"\n"
		"ALikelihood_Kcross_grad_X(ALikelihood self, limix::CovarInput const & Xstar, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALikelihood const *\n"
		"Xstar: limix::CovarInput const &\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"ALikelihood_Kdiag_grad_X", _wrap_ALikelihood_Kdiag_grad_X, METH_VARARGS, (char *)"\n"
		"ALikelihood_Kdiag_grad_X(ALikelihood self, limix::muint_t const d)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALikelihood const *\n"
		"d: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"ALikelihood_swigregister", ALikelihood_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CLikNormalNULL", _wrap_new_CLikNormalNULL, METH_VARARGS, (char *)"new_CLikNormalNULL() -> CLikNormalNULL"},
	 { (char *)"delete_CLikNormalNULL", _wrap_delete_CLikNormalNULL, METH_VARARGS, (char *)"\n"
		"delete_CLikNormalNULL(CLikNormalNULL self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalNULL *\n"
		"\n"
		""},
	 { (char *)"CLikNormalNULL_K", _wrap_CLikNormalNULL_K, METH_VARARGS, (char *)"\n"
		"CLikNormalNULL_K(CLikNormalNULL self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalNULL const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalNULL_Kdiag", _wrap_CLikNormalNULL_Kdiag, METH_VARARGS, (char *)"\n"
		"CLikNormalNULL_Kdiag(CLikNormalNULL self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalNULL const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalNULL_Kcross_diag", _wrap_CLikNormalNULL_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CLikNormalNULL_Kcross_diag(CLikNormalNULL self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalNULL const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLikNormalNULL_Kgrad_param", _wrap_CLikNormalNULL_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CLikNormalNULL_Kgrad_param(CLikNormalNULL self, limix::muint_t const row)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalNULL const *\n"
		"row: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLikNormalNULL_Khess_param", _wrap_CLikNormalNULL_Khess_param, METH_VARARGS, (char *)"\n"
		"CLikNormalNULL_Khess_param(CLikNormalNULL self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalNULL const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLikNormalNULL_setX", _wrap_CLikNormalNULL_setX, METH_VARARGS, (char *)"\n"
		"CLikNormalNULL_setX(CLikNormalNULL self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalNULL *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLikNormalNULL_getName", _wrap_CLikNormalNULL_getName, METH_VARARGS, (char *)"\n"
		"CLikNormalNULL_getName(CLikNormalNULL self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalNULL const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalNULL_swigregister", CLikNormalNULL_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CLikNormalIso", _wrap_new_CLikNormalIso, METH_VARARGS, (char *)"new_CLikNormalIso() -> CLikNormalIso"},
	 { (char *)"delete_CLikNormalIso", _wrap_delete_CLikNormalIso, METH_VARARGS, (char *)"\n"
		"delete_CLikNormalIso(CLikNormalIso self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalIso *\n"
		"\n"
		""},
	 { (char *)"CLikNormalIso_K", _wrap_CLikNormalIso_K, METH_VARARGS, (char *)"\n"
		"CLikNormalIso_K(CLikNormalIso self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalIso const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalIso_Kdiag", _wrap_CLikNormalIso_Kdiag, METH_VARARGS, (char *)"\n"
		"CLikNormalIso_Kdiag(CLikNormalIso self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalIso const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalIso_Kcross_diag", _wrap_CLikNormalIso_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CLikNormalIso_Kcross_diag(CLikNormalIso self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalIso const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLikNormalIso_Kgrad_param", _wrap_CLikNormalIso_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CLikNormalIso_Kgrad_param(CLikNormalIso self, limix::muint_t const row)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalIso const *\n"
		"row: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLikNormalIso_Khess_param", _wrap_CLikNormalIso_Khess_param, METH_VARARGS, (char *)"\n"
		"CLikNormalIso_Khess_param(CLikNormalIso self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalIso const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLikNormalIso_setX", _wrap_CLikNormalIso_setX, METH_VARARGS, (char *)"\n"
		"CLikNormalIso_setX(CLikNormalIso self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalIso *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLikNormalIso_getName", _wrap_CLikNormalIso_getName, METH_VARARGS, (char *)"\n"
		"CLikNormalIso_getName(CLikNormalIso self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalIso const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalIso_swigregister", CLikNormalIso_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CLikNormalSVD", _wrap_new_CLikNormalSVD, METH_VARARGS, (char *)"new_CLikNormalSVD() -> CLikNormalSVD"},
	 { (char *)"delete_CLikNormalSVD", _wrap_delete_CLikNormalSVD, METH_VARARGS, (char *)"\n"
		"delete_CLikNormalSVD(CLikNormalSVD self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD *\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_K", _wrap_CLikNormalSVD_K, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_K(CLikNormalSVD self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_Kdiag", _wrap_CLikNormalSVD_Kdiag, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_Kdiag(CLikNormalSVD self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_Kcross_diag", _wrap_CLikNormalSVD_Kcross_diag, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_Kcross_diag(CLikNormalSVD self, limix::CovarInput const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD const *\n"
		"Xstar: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_Kgrad_param", _wrap_CLikNormalSVD_Kgrad_param, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_Kgrad_param(CLikNormalSVD self, limix::muint_t const row)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD const *\n"
		"row: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_Khess_param", _wrap_CLikNormalSVD_Khess_param, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_Khess_param(CLikNormalSVD self, limix::muint_t const i, limix::muint_t const j)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD const *\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_setX", _wrap_CLikNormalSVD_setX, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_setX(CLikNormalSVD self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_getSigmaK2", _wrap_CLikNormalSVD_getSigmaK2, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_getSigmaK2(CLikNormalSVD self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD *\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_getDelta", _wrap_CLikNormalSVD_getDelta, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_getDelta(CLikNormalSVD self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD *\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_getSigmaK2grad", _wrap_CLikNormalSVD_getSigmaK2grad, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_getSigmaK2grad(CLikNormalSVD self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD *\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_getDeltagrad", _wrap_CLikNormalSVD_getDeltagrad, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_getDeltagrad(CLikNormalSVD self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD *\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_getName", _wrap_CLikNormalSVD_getName, METH_VARARGS, (char *)"\n"
		"CLikNormalSVD_getName(CLikNormalSVD self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLikNormalSVD const *\n"
		"\n"
		""},
	 { (char *)"CLikNormalSVD_swigregister", CLikNormalSVD_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_ADataTerm", _wrap_delete_ADataTerm, METH_VARARGS, (char *)"\n"
		"delete_ADataTerm(ADataTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_setParams", _wrap_ADataTerm_setParams, METH_VARARGS, (char *)"\n"
		"ADataTerm_setParams(ADataTerm self, MatrixXd const & params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"params: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"ADataTerm_aGetParams", _wrap_ADataTerm_aGetParams, METH_VARARGS, (char *)"\n"
		"ADataTerm_aGetParams(ADataTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_getParams", _wrap_ADataTerm_getParams, METH_VARARGS, (char *)"\n"
		"ADataTerm_getParams(ADataTerm self) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_setY", _wrap_ADataTerm_setY, METH_VARARGS, (char *)"\n"
		"ADataTerm_setY(ADataTerm self, MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"Y: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"ADataTerm_getRowsParams", _wrap_ADataTerm_getRowsParams, METH_VARARGS, (char *)"\n"
		"ADataTerm_getRowsParams(ADataTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_getColsParams", _wrap_ADataTerm_getColsParams, METH_VARARGS, (char *)"\n"
		"ADataTerm_getColsParams(ADataTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_evaluate", _wrap_ADataTerm_evaluate, METH_VARARGS, (char *)"\n"
		"ADataTerm_evaluate(ADataTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_gradY", _wrap_ADataTerm_gradY, METH_VARARGS, (char *)"\n"
		"ADataTerm_gradY(ADataTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_aGradParams", _wrap_ADataTerm_aGradParams, METH_VARARGS, (char *)"\n"
		"ADataTerm_aGradParams(ADataTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_sumJacobianGradParams", _wrap_ADataTerm_sumJacobianGradParams, METH_VARARGS, (char *)"\n"
		"ADataTerm_sumJacobianGradParams(ADataTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_sumLogJacobian", _wrap_ADataTerm_sumLogJacobian, METH_VARARGS, (char *)"\n"
		"ADataTerm_sumLogJacobian(ADataTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_getY", _wrap_ADataTerm_getY, METH_VARARGS, (char *)"\n"
		"ADataTerm_getY(ADataTerm self) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_gradParams", _wrap_ADataTerm_gradParams, METH_VARARGS, (char *)"\n"
		"ADataTerm_gradParams(ADataTerm self, MatrixXd const & KinvY) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"KinvY: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"ADataTerm_getName", _wrap_ADataTerm_getName, METH_VARARGS, (char *)"\n"
		"ADataTerm_getName(ADataTerm self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm const *\n"
		"\n"
		""},
	 { (char *)"ADataTerm_checkDimensions", _wrap_ADataTerm_checkDimensions, METH_VARARGS, (char *)"\n"
		"ADataTerm_checkDimensions(ADataTerm self, MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ADataTerm *\n"
		"Y: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"ADataTerm_swigregister", ADataTerm_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CData", _wrap_new_CData, METH_VARARGS, (char *)"\n"
		"CData()\n"
		"new_CData(MatrixXd & Y) -> CData\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd &\n"
		"\n"
		""},
	 { (char *)"delete_CData", _wrap_delete_CData, METH_VARARGS, (char *)"\n"
		"delete_CData(CData self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CData *\n"
		"\n"
		""},
	 { (char *)"CData_getName", _wrap_CData_getName, METH_VARARGS, (char *)"\n"
		"CData_getName(CData self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CData const *\n"
		"\n"
		""},
	 { (char *)"CData_getRowsParams", _wrap_CData_getRowsParams, METH_VARARGS, (char *)"\n"
		"CData_getRowsParams(CData self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CData *\n"
		"\n"
		""},
	 { (char *)"CData_getColsParams", _wrap_CData_getColsParams, METH_VARARGS, (char *)"\n"
		"CData_getColsParams(CData self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CData *\n"
		"\n"
		""},
	 { (char *)"CData_swigregister", CData_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CLinearMean", _wrap_new_CLinearMean, METH_VARARGS, (char *)"\n"
		"CLinearMean()\n"
		"CLinearMean(limix::muint_t nTargets)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"nTargets: limix::muint_t\n"
		"\n"
		"CLinearMean(MatrixXd const & Y, MatrixXd const & weights, MatrixXd const & fixedEffects)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd const &\n"
		"weights: MatrixXd const &\n"
		"fixedEffects: MatrixXd const &\n"
		"\n"
		"new_CLinearMean(MatrixXd const & Y, MatrixXd const & fixedEffects) -> CLinearMean\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd const &\n"
		"fixedEffects: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"delete_CLinearMean", _wrap_delete_CLinearMean, METH_VARARGS, (char *)"\n"
		"delete_CLinearMean(CLinearMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_agetA", _wrap_CLinearMean_agetA, METH_VARARGS, (char *)"\n"
		"CLinearMean_agetA(CLinearMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_getA", _wrap_CLinearMean_getA, METH_VARARGS, (char *)"\n"
		"CLinearMean_getA(CLinearMean self) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_evaluate", _wrap_CLinearMean_evaluate, METH_VARARGS, (char *)"\n"
		"CLinearMean_evaluate(CLinearMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_aGradParams", _wrap_CLinearMean_aGradParams, METH_VARARGS, (char *)"\n"
		"CLinearMean_aGradParams(CLinearMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_setParams", _wrap_CLinearMean_setParams, METH_VARARGS, (char *)"\n"
		"CLinearMean_setParams(CLinearMean self, MatrixXd const & weightMatrix)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"weightMatrix: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CLinearMean_setFixedEffects", _wrap_CLinearMean_setFixedEffects, METH_VARARGS, (char *)"\n"
		"CLinearMean_setFixedEffects(CLinearMean self, MatrixXd const & fixedEffects)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"fixedEffects: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CLinearMean_aGetParams", _wrap_CLinearMean_aGetParams, METH_VARARGS, (char *)"\n"
		"CLinearMean_aGetParams(CLinearMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_aGetFixedEffects", _wrap_CLinearMean_aGetFixedEffects, METH_VARARGS, (char *)"\n"
		"CLinearMean_aGetFixedEffects(CLinearMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_aPredictY", _wrap_CLinearMean_aPredictY, METH_VARARGS, (char *)"\n"
		"CLinearMean_aPredictY(CLinearMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean const *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_aPredictYstar", _wrap_CLinearMean_aPredictYstar, METH_VARARGS, (char *)"\n"
		"CLinearMean_aPredictYstar(CLinearMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean const *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_getRowsParams", _wrap_CLinearMean_getRowsParams, METH_VARARGS, (char *)"\n"
		"CLinearMean_getRowsParams(CLinearMean self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_getColsParams", _wrap_CLinearMean_getColsParams, METH_VARARGS, (char *)"\n"
		"CLinearMean_getColsParams(CLinearMean self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_getFixedEffects", _wrap_CLinearMean_getFixedEffects, METH_VARARGS, (char *)"\n"
		"CLinearMean_getFixedEffects(CLinearMean self) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_getName", _wrap_CLinearMean_getName, METH_VARARGS, (char *)"\n"
		"CLinearMean_getName(CLinearMean self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean const *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_checkDimensions", _wrap_CLinearMean_checkDimensions, METH_VARARGS, (char *)"\n"
		"checkDimensions(MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd const &\n"
		"\n"
		"checkDimensions(MatrixXd const & weights, MatrixXd const & fixedEffects, MatrixXd const & Y, bool const checkStrictWeights=False, bool const checkStrictFixedEffects=False, bool const checkStrictY=False)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"weights: MatrixXd const &\n"
		"fixedEffects: MatrixXd const &\n"
		"Y: MatrixXd const &\n"
		"checkStrictWeights: bool const\n"
		"checkStrictFixedEffects: bool const\n"
		"checkStrictY: bool const\n"
		"\n"
		"checkDimensions(MatrixXd const & weights, MatrixXd const & fixedEffects, MatrixXd const & Y, bool const checkStrictWeights=False, bool const checkStrictFixedEffects=False)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"weights: MatrixXd const &\n"
		"fixedEffects: MatrixXd const &\n"
		"Y: MatrixXd const &\n"
		"checkStrictWeights: bool const\n"
		"checkStrictFixedEffects: bool const\n"
		"\n"
		"checkDimensions(MatrixXd const & weights, MatrixXd const & fixedEffects, MatrixXd const & Y, bool const checkStrictWeights=False)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"weights: MatrixXd const &\n"
		"fixedEffects: MatrixXd const &\n"
		"Y: MatrixXd const &\n"
		"checkStrictWeights: bool const\n"
		"\n"
		"CLinearMean_checkDimensions(CLinearMean self, MatrixXd const & weights, MatrixXd const & fixedEffects, MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean const *\n"
		"weights: MatrixXd const &\n"
		"fixedEffects: MatrixXd const &\n"
		"Y: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CLinearMean_predictY", _wrap_CLinearMean_predictY, METH_VARARGS, (char *)"\n"
		"predictY() -> MatrixXd\n"
		"CLinearMean_predictY(CLinearMean self, MatrixXd const & fixedEffects) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean const *\n"
		"fixedEffects: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CLinearMean_setWeightsOLS", _wrap_CLinearMean_setWeightsOLS, METH_VARARGS, (char *)"\n"
		"setWeightsOLS()\n"
		"CLinearMean_setWeightsOLS(CLinearMean self, MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean *\n"
		"Y: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CLinearMean_getNTargets", _wrap_CLinearMean_getNTargets, METH_VARARGS, (char *)"\n"
		"CLinearMean_getNTargets(CLinearMean self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLinearMean const *\n"
		"\n"
		""},
	 { (char *)"CLinearMean_swigregister", CLinearMean_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CSumLinear", _wrap_new_CSumLinear, METH_VARARGS, (char *)"new_CSumLinear() -> CSumLinear"},
	 { (char *)"delete_CSumLinear", _wrap_delete_CSumLinear, METH_VARARGS, (char *)"\n"
		"delete_CSumLinear(CSumLinear self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"\n"
		""},
	 { (char *)"CSumLinear_aGetParams", _wrap_CSumLinear_aGetParams, METH_VARARGS, (char *)"\n"
		"CSumLinear_aGetParams(CSumLinear self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"\n"
		""},
	 { (char *)"CSumLinear_setParams", _wrap_CSumLinear_setParams, METH_VARARGS, (char *)"\n"
		"CSumLinear_setParams(CSumLinear self, MatrixXd const & params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"params: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CSumLinear_evaluate", _wrap_CSumLinear_evaluate, METH_VARARGS, (char *)"\n"
		"CSumLinear_evaluate(CSumLinear self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"\n"
		""},
	 { (char *)"CSumLinear_aGradParams", _wrap_CSumLinear_aGradParams, METH_VARARGS, (char *)"\n"
		"CSumLinear_aGradParams(CSumLinear self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"\n"
		""},
	 { (char *)"CSumLinear_appendTerm", _wrap_CSumLinear_appendTerm, METH_VARARGS, (char *)"\n"
		"CSumLinear_appendTerm(CSumLinear self, limix::PLinearMean term)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"term: limix::PLinearMean\n"
		"\n"
		""},
	 { (char *)"CSumLinear_getTerm", _wrap_CSumLinear_getTerm, METH_VARARGS, (char *)"\n"
		"CSumLinear_getTerm(CSumLinear self, limix::muint_t ind) -> limix::PLinearMean\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"ind: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CSumLinear_getNterms", _wrap_CSumLinear_getNterms, METH_VARARGS, (char *)"\n"
		"CSumLinear_getNterms(CSumLinear self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear const *\n"
		"\n"
		""},
	 { (char *)"CSumLinear_getTerms", _wrap_CSumLinear_getTerms, METH_VARARGS, (char *)"\n"
		"CSumLinear_getTerms(CSumLinear self) -> limix::VecLinearMean &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"\n"
		""},
	 { (char *)"CSumLinear_getRowsParams", _wrap_CSumLinear_getRowsParams, METH_VARARGS, (char *)"\n"
		"CSumLinear_getRowsParams(CSumLinear self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"\n"
		""},
	 { (char *)"CSumLinear_getColsParams", _wrap_CSumLinear_getColsParams, METH_VARARGS, (char *)"\n"
		"CSumLinear_getColsParams(CSumLinear self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSumLinear *\n"
		"\n"
		""},
	 { (char *)"CSumLinear_swigregister", CSumLinear_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CKroneckerMean", _wrap_new_CKroneckerMean, METH_VARARGS, (char *)"\n"
		"CKroneckerMean()\n"
		"CKroneckerMean(MatrixXd & Y, MatrixXd & fixedEffects, MatrixXd & A)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd &\n"
		"fixedEffects: MatrixXd &\n"
		"A: MatrixXd &\n"
		"\n"
		"new_CKroneckerMean(MatrixXd & Y, MatrixXd & weights, MatrixXd & fixedEffects, MatrixXd & A) -> CKroneckerMean\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd &\n"
		"weights: MatrixXd &\n"
		"fixedEffects: MatrixXd &\n"
		"A: MatrixXd &\n"
		"\n"
		""},
	 { (char *)"delete_CKroneckerMean", _wrap_delete_CKroneckerMean, METH_VARARGS, (char *)"\n"
		"delete_CKroneckerMean(CKroneckerMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_setA", _wrap_CKroneckerMean_setA, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_setA(CKroneckerMean self, MatrixXd const & A)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean *\n"
		"A: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_agetA", _wrap_CKroneckerMean_agetA, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_agetA(CKroneckerMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_evaluate", _wrap_CKroneckerMean_evaluate, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_evaluate(CKroneckerMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_aPredictY", _wrap_CKroneckerMean_aPredictY, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_aPredictY(CKroneckerMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_aGradParams", _wrap_CKroneckerMean_aGradParams, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_aGradParams(CKroneckerMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_setWeightsOLS", _wrap_CKroneckerMean_setWeightsOLS, METH_VARARGS, (char *)"\n"
		"setWeightsOLS(MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd const &\n"
		"\n"
		"CKroneckerMean_setWeightsOLS(CKroneckerMean self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_checkDimensions", _wrap_CKroneckerMean_checkDimensions, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_checkDimensions(CKroneckerMean self, MatrixXd const & Y, bool const checkStrictWeights)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean const *\n"
		"Y: MatrixXd const &\n"
		"checkStrictWeights: bool const\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_getName", _wrap_CKroneckerMean_getName, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_getName(CKroneckerMean self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_getDimFixedEffects", _wrap_CKroneckerMean_getDimFixedEffects, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_getDimFixedEffects(CKroneckerMean self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean const *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_getColsParams", _wrap_CKroneckerMean_getColsParams, METH_VARARGS, (char *)"\n"
		"CKroneckerMean_getColsParams(CKroneckerMean self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerMean *\n"
		"\n"
		""},
	 { (char *)"CKroneckerMean_swigregister", CKroneckerMean_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CGPHyperParams", _wrap_new_CGPHyperParams, METH_VARARGS, (char *)"\n"
		"CGPHyperParams()\n"
		"new_CGPHyperParams(CGPHyperParams _param) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"_param: limix::CGPHyperParams const &\n"
		"\n"
		""},
	 { (char *)"delete_CGPHyperParams", _wrap_delete_CGPHyperParams, METH_VARARGS, (char *)"\n"
		"delete_CGPHyperParams(CGPHyperParams self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams *\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams_getParamArray", _wrap_CGPHyperParams_getParamArray, METH_VARARGS, (char *)"\n"
		"getParamArray()\n"
		"CGPHyperParams_getParamArray(CGPHyperParams self, CGPHyperParams mask)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams const *\n"
		"mask: limix::CGPHyperParams const &\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams_setParamArray", _wrap_CGPHyperParams_setParamArray, METH_VARARGS, (char *)"\n"
		"setParamArray(VectorXd const & param)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"param: VectorXd const &\n"
		"\n"
		"CGPHyperParams_setParamArray(CGPHyperParams self, VectorXd const & param, CGPHyperParams mask)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams *\n"
		"param: VectorXd const &\n"
		"mask: limix::CGPHyperParams const &\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams_getNumberParams", _wrap_CGPHyperParams_getNumberParams, METH_VARARGS, (char *)"\n"
		"getNumberParams() -> limix::muint_t\n"
		"CGPHyperParams_getNumberParams(CGPHyperParams self, CGPHyperParams mask) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams const *\n"
		"mask: limix::CGPHyperParams const &\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams___setitem__", _wrap_CGPHyperParams___setitem__, METH_VARARGS, (char *)"\n"
		"CGPHyperParams___setitem__(CGPHyperParams self, std::string const & name, MatrixXd const & value)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams *\n"
		"name: std::string const &\n"
		"value: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams___getitem__", _wrap_CGPHyperParams___getitem__, METH_VARARGS, (char *)"\n"
		"CGPHyperParams___getitem__(CGPHyperParams self, std::string const & name)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams *\n"
		"name: std::string const &\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams_getNames", _wrap_CGPHyperParams_getNames, METH_VARARGS, (char *)"\n"
		"CGPHyperParams_getNames(CGPHyperParams self) -> StringVec\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams const *\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams_exists", _wrap_CGPHyperParams_exists, METH_VARARGS, (char *)"\n"
		"CGPHyperParams_exists(CGPHyperParams self, std::string name) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams const *\n"
		"name: std::string\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams___str__", _wrap_CGPHyperParams___str__, METH_VARARGS, (char *)"\n"
		"CGPHyperParams___str__(CGPHyperParams self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPHyperParams const *\n"
		"\n"
		""},
	 { (char *)"CGPHyperParams_swigregister", CGPHyperParams_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CGPCholCache", _wrap_new_CGPCholCache, METH_VARARGS, (char *)"\n"
		"new_CGPCholCache(CGPbase gp) -> CGPCholCache\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gp: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"delete_CGPCholCache", _wrap_delete_CGPCholCache, METH_VARARGS, (char *)"\n"
		"delete_CGPCholCache(CGPCholCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_getCovar", _wrap_CGPCholCache_getCovar, METH_VARARGS, (char *)"\n"
		"CGPCholCache_getCovar(CGPCholCache self) -> limix::PCovarianceFunctionCacheOld\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_setCovar", _wrap_CGPCholCache_setCovar, METH_VARARGS, (char *)"\n"
		"CGPCholCache_setCovar(CGPCholCache self, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_rgetKEff", _wrap_CGPCholCache_rgetKEff, METH_VARARGS, (char *)"\n"
		"CGPCholCache_rgetKEff(CGPCholCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_rgetKEffChol", _wrap_CGPCholCache_rgetKEffChol, METH_VARARGS, (char *)"\n"
		"CGPCholCache_rgetKEffChol(CGPCholCache self) -> MatrixXdChol &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_rgetKEffInv", _wrap_CGPCholCache_rgetKEffInv, METH_VARARGS, (char *)"\n"
		"CGPCholCache_rgetKEffInv(CGPCholCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_rgetYeffective", _wrap_CGPCholCache_rgetYeffective, METH_VARARGS, (char *)"\n"
		"CGPCholCache_rgetYeffective(CGPCholCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_rgetKEffInvY", _wrap_CGPCholCache_rgetKEffInvY, METH_VARARGS, (char *)"\n"
		"CGPCholCache_rgetKEffInvY(CGPCholCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_getDKEffInv_KEffInvYYKinv", _wrap_CGPCholCache_getDKEffInv_KEffInvYYKinv, METH_VARARGS, (char *)"\n"
		"CGPCholCache_getDKEffInv_KEffInvYYKinv(CGPCholCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPCholCache *\n"
		"\n"
		""},
	 { (char *)"CGPCholCache_swigregister", CGPCholCache_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CGPbase", _wrap_new_CGPbase, METH_VARARGS, (char *)"\n"
		"CGPbase(limix::PCovarianceFunction covar, limix::PLikelihood lik, limix::PDataTerm data)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::PCovarianceFunction\n"
		"lik: limix::PLikelihood\n"
		"data: limix::PDataTerm\n"
		"\n"
		"CGPbase(limix::PCovarianceFunction covar, limix::PLikelihood lik)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::PCovarianceFunction\n"
		"lik: limix::PLikelihood\n"
		"\n"
		"new_CGPbase(limix::PCovarianceFunction covar) -> CGPbase\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"delete_CGPbase", _wrap_delete_CGPbase, METH_VARARGS, (char *)"\n"
		"delete_CGPbase(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_set_data", _wrap_CGPbase_set_data, METH_VARARGS, (char *)"\n"
		"CGPbase_set_data(CGPbase self, MatrixXd & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"Y: MatrixXd &\n"
		"\n"
		""},
	 { (char *)"CGPbase_setCovar", _wrap_CGPbase_setCovar, METH_VARARGS, (char *)"\n"
		"CGPbase_setCovar(CGPbase self, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CGPbase_setLik", _wrap_CGPbase_setLik, METH_VARARGS, (char *)"\n"
		"CGPbase_setLik(CGPbase self, limix::PLikelihood lik)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"lik: limix::PLikelihood\n"
		"\n"
		""},
	 { (char *)"CGPbase_setDataTerm", _wrap_CGPbase_setDataTerm, METH_VARARGS, (char *)"\n"
		"CGPbase_setDataTerm(CGPbase self, limix::PDataTerm data)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"data: limix::PDataTerm\n"
		"\n"
		""},
	 { (char *)"CGPbase_setLambda", _wrap_CGPbase_setLambda, METH_VARARGS, (char *)"\n"
		"CGPbase_setLambda(CGPbase self, limix::mfloat_t arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"lambda: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"CGPbase_setLambdaG", _wrap_CGPbase_setLambdaG, METH_VARARGS, (char *)"\n"
		"CGPbase_setLambdaG(CGPbase self, limix::mfloat_t arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"lambda: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"CGPbase_setLambdaN", _wrap_CGPbase_setLambdaN, METH_VARARGS, (char *)"\n"
		"CGPbase_setLambdaN(CGPbase self, limix::mfloat_t arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"lambda: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"CGPbase_setParams", _wrap_CGPbase_setParams, METH_VARARGS, (char *)"\n"
		"setParams(CGPHyperParams hyperparams)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"hyperparams: limix::CGPHyperParams const &\n"
		"\n"
		"CGPbase_setParams(CGPbase self, CGPHyperParams hyperparams, CGPHyperParams mask)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"hyperparams: limix::CGPHyperParams const &\n"
		"mask: limix::CGPHyperParams const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_getParams", _wrap_CGPbase_getParams, METH_VARARGS, (char *)"\n"
		"CGPbase_getParams(CGPbase self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase const *\n"
		"\n"
		""},
	 { (char *)"CGPbase_setParamArray", _wrap_CGPbase_setParamArray, METH_VARARGS, (char *)"\n"
		"setParamArray(VectorXd const & hyperparams)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"hyperparams: VectorXd const &\n"
		"\n"
		"CGPbase_setParamArray(CGPbase self, VectorXd const & param, CGPHyperParams mask)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"param: VectorXd const &\n"
		"mask: limix::CGPHyperParams const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_getParamArray", _wrap_CGPbase_getParamArray, METH_VARARGS, (char *)"\n"
		"CGPbase_getParamArray(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase const *\n"
		"\n"
		""},
	 { (char *)"CGPbase_getParamBounds", _wrap_CGPbase_getParamBounds, METH_VARARGS, (char *)"\n"
		"CGPbase_getParamBounds(CGPbase self, bool upper) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase const *\n"
		"upper: bool\n"
		"\n"
		""},
	 { (char *)"CGPbase_getParamMask", _wrap_CGPbase_getParamMask, METH_VARARGS, (char *)"\n"
		"CGPbase_getParamMask(CGPbase self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase const *\n"
		"\n"
		""},
	 { (char *)"CGPbase_getY", _wrap_CGPbase_getY, METH_VARARGS, (char *)"\n"
		"CGPbase_getY(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_setY", _wrap_CGPbase_setY, METH_VARARGS, (char *)"\n"
		"CGPbase_setY(CGPbase self, MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"Y: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_getX", _wrap_CGPbase_getX, METH_VARARGS, (char *)"\n"
		"CGPbase_getX(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase const *\n"
		"\n"
		""},
	 { (char *)"CGPbase_setX", _wrap_CGPbase_setX, METH_VARARGS, (char *)"\n"
		"CGPbase_setX(CGPbase self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_getNumberSamples", _wrap_CGPbase_getNumberSamples, METH_VARARGS, (char *)"\n"
		"CGPbase_getNumberSamples(CGPbase self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_getNumberDimension", _wrap_CGPbase_getNumberDimension, METH_VARARGS, (char *)"\n"
		"CGPbase_getNumberDimension(CGPbase self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_getCache", _wrap_CGPbase_getCache, METH_VARARGS, (char *)"\n"
		"CGPbase_getCache(CGPbase self) -> limix::PGPCholCache\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_getCovar", _wrap_CGPbase_getCovar, METH_VARARGS, (char *)"\n"
		"CGPbase_getCovar(CGPbase self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_getLik", _wrap_CGPbase_getLik, METH_VARARGS, (char *)"\n"
		"CGPbase_getLik(CGPbase self) -> limix::PLikelihood\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_getDataTerm", _wrap_CGPbase_getDataTerm, METH_VARARGS, (char *)"\n"
		"CGPbase_getDataTerm(CGPbase self) -> limix::PDataTerm\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_agetKEffInvYCache", _wrap_CGPbase_agetKEffInvYCache, METH_VARARGS, (char *)"\n"
		"CGPbase_agetKEffInvYCache(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_LML", _wrap_CGPbase_LML, METH_VARARGS, (char *)"\n"
		"LML() -> limix::mfloat_t\n"
		"LML(CGPHyperParams params) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"params: limix::CGPHyperParams const &\n"
		"\n"
		"CGPbase_LML(CGPbase self, VectorXd const & params) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"params: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLgrad", _wrap_CGPbase_LMLgrad, METH_VARARGS, (char *)"\n"
		"LMLgrad() -> CGPHyperParams\n"
		"LMLgrad(CGPHyperParams params) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"params: limix::CGPHyperParams const &\n"
		"\n"
		"CGPbase_LMLgrad(CGPbase self, VectorXd const & paramArray) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"paramArray: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_aLMLgrad", _wrap_CGPbase_aLMLgrad, METH_VARARGS, (char *)"\n"
		"aLMLgrad()\n"
		"aLMLgrad(CGPHyperParams params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"params: limix::CGPHyperParams const &\n"
		"\n"
		"CGPbase_aLMLgrad(CGPbase self, VectorXd const & paramArray)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"paramArray: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLgrad_covar", _wrap_CGPbase_LMLgrad_covar, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLgrad_covar(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLgrad_lik", _wrap_CGPbase_LMLgrad_lik, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLgrad_lik(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_aLMLgrad_X", _wrap_CGPbase_aLMLgrad_X, METH_VARARGS, (char *)"\n"
		"CGPbase_aLMLgrad_X(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_aLMLgrad_dataTerm", _wrap_CGPbase_aLMLgrad_dataTerm, METH_VARARGS, (char *)"\n"
		"CGPbase_aLMLgrad_dataTerm(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLhess", _wrap_CGPbase_LMLhess, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLhess(CGPbase self, StringVec vecLabels)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"vecLabels: limix::stringVec\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLhess_covar", _wrap_CGPbase_LMLhess_covar, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLhess_covar(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLhess_lik", _wrap_CGPbase_LMLhess_lik, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLhess_lik(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLhess_covarlik", _wrap_CGPbase_LMLhess_covarlik, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLhess_covarlik(CGPbase self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_getCov_laplace", _wrap_CGPbase_getCov_laplace, METH_VARARGS, (char *)"\n"
		"CGPbase_getCov_laplace(CGPbase self, StringVec vecLabels)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"vecLabels: limix::stringVec\n"
		"\n"
		""},
	 { (char *)"CGPbase_getStd_laplace", _wrap_CGPbase_getStd_laplace, METH_VARARGS, (char *)"\n"
		"CGPbase_getStd_laplace(CGPbase self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_predictMean", _wrap_CGPbase_predictMean, METH_VARARGS, (char *)"\n"
		"CGPbase_predictMean(CGPbase self, MatrixXd const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"Xstar: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_predictVar", _wrap_CGPbase_predictVar, METH_VARARGS, (char *)"\n"
		"CGPbase_predictVar(CGPbase self, MatrixXd const & Xstar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"Xstar: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLgrad_X", _wrap_CGPbase_LMLgrad_X, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLgrad_X(CGPbase self) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLgrad_dataTerm", _wrap_CGPbase_LMLgrad_dataTerm, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLgrad_dataTerm(CGPbase self) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPbase *\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLgrad_num", _wrap_CGPbase_LMLgrad_num, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLgrad_num(CGPbase gp, limix::muint_t const i) -> double\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gp: limix::CGPbase &\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CGPbase_LMLhess_num", _wrap_CGPbase_LMLhess_num, METH_VARARGS, (char *)"\n"
		"CGPbase_LMLhess_num(CGPbase gp, limix::muint_t const i, limix::muint_t const j) -> double\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gp: limix::CGPbase &\n"
		"i: limix::muint_t const\n"
		"j: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CGPbase_swigregister", CGPbase_swigregister, METH_VARARGS, NULL},
	 { (char *)"CGPKroneckerCache_covar_r_set", _wrap_CGPKroneckerCache_covar_r_set, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_covar_r_set(CGPKroneckerCache self, limix::PCovarianceFunctionCacheOld const & covar_r)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"covar_r: limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_covar_r_get", _wrap_CGPKroneckerCache_covar_r_get, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_covar_r_get(CGPKroneckerCache self) -> limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_covar_c_set", _wrap_CGPKroneckerCache_covar_c_set, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_covar_c_set(CGPKroneckerCache self, limix::PCovarianceFunctionCacheOld const & covar_c)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"covar_c: limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_covar_c_get", _wrap_CGPKroneckerCache_covar_c_get, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_covar_c_get(CGPKroneckerCache self) -> limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"new_CGPKroneckerCache", _wrap_new_CGPKroneckerCache, METH_VARARGS, (char *)"\n"
		"new_CGPKroneckerCache(CGPkronecker gp) -> CGPKroneckerCache\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gp: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"delete_CGPKroneckerCache", _wrap_delete_CGPKroneckerCache, METH_VARARGS, (char *)"\n"
		"delete_CGPKroneckerCache(CGPKroneckerCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_rgetYrot", _wrap_CGPKroneckerCache_rgetYrot, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_rgetYrot(CGPKroneckerCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_rgetSi", _wrap_CGPKroneckerCache_rgetSi, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_rgetSi(CGPKroneckerCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_rgetYSi", _wrap_CGPKroneckerCache_rgetYSi, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_rgetYSi(CGPKroneckerCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_rgetKinvY", _wrap_CGPKroneckerCache_rgetKinvY, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_rgetKinvY(CGPKroneckerCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_agetSi", _wrap_CGPKroneckerCache_agetSi, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_agetSi(CGPKroneckerCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_agetYSi", _wrap_CGPKroneckerCache_agetYSi, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_agetYSi(CGPKroneckerCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_agetYrot", _wrap_CGPKroneckerCache_agetYrot, METH_VARARGS, (char *)"\n"
		"CGPKroneckerCache_agetYrot(CGPKroneckerCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPKroneckerCache *\n"
		"\n"
		""},
	 { (char *)"CGPKroneckerCache_swigregister", CGPKroneckerCache_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CGPkronecker", _wrap_new_CGPkronecker, METH_VARARGS, (char *)"\n"
		"CGPkronecker(limix::PCovarianceFunction covar_r, limix::PCovarianceFunction covar_c, limix::PLikelihood lik, limix::PDataTerm mean)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar_r: limix::PCovarianceFunction\n"
		"covar_c: limix::PCovarianceFunction\n"
		"lik: limix::PLikelihood\n"
		"mean: limix::PDataTerm\n"
		"\n"
		"CGPkronecker(limix::PCovarianceFunction covar_r, limix::PCovarianceFunction covar_c, limix::PLikelihood lik)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar_r: limix::PCovarianceFunction\n"
		"covar_c: limix::PCovarianceFunction\n"
		"lik: limix::PLikelihood\n"
		"\n"
		"new_CGPkronecker(limix::PCovarianceFunction covar_r, limix::PCovarianceFunction covar_c) -> CGPkronecker\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covar_r: limix::PCovarianceFunction\n"
		"covar_c: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"delete_CGPkronecker", _wrap_delete_CGPkronecker, METH_VARARGS, (char *)"\n"
		"delete_CGPkronecker(CGPkronecker self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_setX_r", _wrap_CGPkronecker_setX_r, METH_VARARGS, (char *)"\n"
		"CGPkronecker_setX_r(CGPkronecker self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_setX_c", _wrap_CGPkronecker_setX_c, METH_VARARGS, (char *)"\n"
		"CGPkronecker_setX_c(CGPkronecker self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_setY", _wrap_CGPkronecker_setY, METH_VARARGS, (char *)"\n"
		"CGPkronecker_setY(CGPkronecker self, MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"Y: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_setCovar_r", _wrap_CGPkronecker_setCovar_r, METH_VARARGS, (char *)"\n"
		"CGPkronecker_setCovar_r(CGPkronecker self, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_setCovar_c", _wrap_CGPkronecker_setCovar_c, METH_VARARGS, (char *)"\n"
		"CGPkronecker_setCovar_c(CGPkronecker self, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_LML", _wrap_CGPkronecker_LML, METH_VARARGS, (char *)"\n"
		"LML() -> limix::mfloat_t\n"
		"LML(CGPHyperParams params) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"params: limix::CGPHyperParams const &\n"
		"\n"
		"CGPkronecker_LML(CGPkronecker self, VectorXd const & params) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"params: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_getLik", _wrap_CGPkronecker_getLik, METH_VARARGS, (char *)"\n"
		"CGPkronecker_getLik(CGPkronecker self) -> limix::PLikNormalSVD\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_predictMean", _wrap_CGPkronecker_predictMean, METH_VARARGS, (char *)"\n"
		"CGPkronecker_predictMean(CGPkronecker self, MatrixXd const & Xstar_r, MatrixXd const & Xstar_c)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"Xstar_r: MatrixXd const &\n"
		"Xstar_c: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_predictVar", _wrap_CGPkronecker_predictVar, METH_VARARGS, (char *)"\n"
		"CGPkronecker_predictVar(CGPkronecker self, MatrixXd const & Xstar_r, MatrixXd const & Xstar_c)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"Xstar_r: MatrixXd const &\n"
		"Xstar_c: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_LMLgrad", _wrap_CGPkronecker_LMLgrad, METH_VARARGS, (char *)"\n"
		"CGPkronecker_LMLgrad(CGPkronecker self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_LMLgrad_covar", _wrap_CGPkronecker_LMLgrad_covar, METH_VARARGS, (char *)"\n"
		"CGPkronecker_LMLgrad_covar(CGPkronecker self, bool columns)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"columns: bool\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_aLMLgrad_covar_r", _wrap_CGPkronecker_aLMLgrad_covar_r, METH_VARARGS, (char *)"\n"
		"CGPkronecker_aLMLgrad_covar_r(CGPkronecker self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_aLMLgrad_covar_c", _wrap_CGPkronecker_aLMLgrad_covar_c, METH_VARARGS, (char *)"\n"
		"CGPkronecker_aLMLgrad_covar_c(CGPkronecker self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_LMLgrad_lik", _wrap_CGPkronecker_LMLgrad_lik, METH_VARARGS, (char *)"\n"
		"CGPkronecker_LMLgrad_lik(CGPkronecker self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_aLMLgrad_X_r", _wrap_CGPkronecker_aLMLgrad_X_r, METH_VARARGS, (char *)"\n"
		"CGPkronecker_aLMLgrad_X_r(CGPkronecker self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_aLMLgrad_X_c", _wrap_CGPkronecker_aLMLgrad_X_c, METH_VARARGS, (char *)"\n"
		"CGPkronecker_aLMLgrad_X_c(CGPkronecker self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_aLMLgrad_dataTerm", _wrap_CGPkronecker_aLMLgrad_dataTerm, METH_VARARGS, (char *)"\n"
		"CGPkronecker_aLMLgrad_dataTerm(CGPkronecker self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_getCache", _wrap_CGPkronecker_getCache, METH_VARARGS, (char *)"\n"
		"CGPkronecker_getCache(CGPkronecker self) -> limix::PGPKroneckerCache\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_getCovarC", _wrap_CGPkronecker_getCovarC, METH_VARARGS, (char *)"\n"
		"CGPkronecker_getCovarC(CGPkronecker self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker const *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_getCovarR", _wrap_CGPkronecker_getCovarR, METH_VARARGS, (char *)"\n"
		"CGPkronecker_getCovarR(CGPkronecker self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker const *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_getGplvmDimensionsC", _wrap_CGPkronecker_getGplvmDimensionsC, METH_VARARGS, (char *)"\n"
		"CGPkronecker_getGplvmDimensionsC(CGPkronecker self) -> VectorXi\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker const *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_getGplvmDimensionsR", _wrap_CGPkronecker_getGplvmDimensionsR, METH_VARARGS, (char *)"\n"
		"CGPkronecker_getGplvmDimensionsR(CGPkronecker self) -> VectorXi\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker const *\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_setGplvmDimensionsC", _wrap_CGPkronecker_setGplvmDimensionsC, METH_VARARGS, (char *)"\n"
		"CGPkronecker_setGplvmDimensionsC(CGPkronecker self, VectorXi gplvmDimensionsC)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"gplvmDimensionsC: VectorXi\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_setGplvmDimensionsR", _wrap_CGPkronecker_setGplvmDimensionsR, METH_VARARGS, (char *)"\n"
		"CGPkronecker_setGplvmDimensionsR(CGPkronecker self, VectorXi gplvmDimensionsR)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronecker *\n"
		"gplvmDimensionsR: VectorXi\n"
		"\n"
		""},
	 { (char *)"CGPkronecker_swigregister", CGPkronecker_swigregister, METH_VARARGS, NULL},
	 { (char *)"CGPkronSumCache_covarc1_set", _wrap_CGPkronSumCache_covarc1_set, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_covarc1_set(CGPkronSumCache self, limix::PCovarianceFunctionCacheOld const & covarc1)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"covarc1: limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_covarc1_get", _wrap_CGPkronSumCache_covarc1_get, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_covarc1_get(CGPkronSumCache self) -> limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_covarc2_set", _wrap_CGPkronSumCache_covarc2_set, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_covarc2_set(CGPkronSumCache self, limix::PCovarianceFunctionCacheOld const & covarc2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"covarc2: limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_covarc2_get", _wrap_CGPkronSumCache_covarc2_get, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_covarc2_get(CGPkronSumCache self) -> limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_covarr1_set", _wrap_CGPkronSumCache_covarr1_set, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_covarr1_set(CGPkronSumCache self, limix::PCovarianceFunctionCacheOld const & covarr1)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"covarr1: limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_covarr1_get", _wrap_CGPkronSumCache_covarr1_get, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_covarr1_get(CGPkronSumCache self) -> limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_covarr2_set", _wrap_CGPkronSumCache_covarr2_set, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_covarr2_set(CGPkronSumCache self, limix::PCovarianceFunctionCacheOld const & covarr2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"covarr2: limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_covarr2_get", _wrap_CGPkronSumCache_covarr2_get, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_covarr2_get(CGPkronSumCache self) -> limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"new_CGPkronSumCache", _wrap_new_CGPkronSumCache, METH_VARARGS, (char *)"\n"
		"new_CGPkronSumCache(CGPkronSum gp) -> CGPkronSumCache\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gp: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"delete_CGPkronSumCache", _wrap_delete_CGPkronSumCache, METH_VARARGS, (char *)"\n"
		"delete_CGPkronSumCache(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetSsigma", _wrap_CGPkronSumCache_rgetSsigma, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetSsigma(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetScstar", _wrap_CGPkronSumCache_rgetScstar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetScstar(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetUcstar", _wrap_CGPkronSumCache_rgetUcstar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetUcstar(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetLambdac", _wrap_CGPkronSumCache_rgetLambdac, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetLambdac(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetSomega", _wrap_CGPkronSumCache_rgetSomega, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetSomega(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetSrstar", _wrap_CGPkronSumCache_rgetSrstar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetSrstar(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetUrstar", _wrap_CGPkronSumCache_rgetUrstar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetUrstar(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetLambdar", _wrap_CGPkronSumCache_rgetLambdar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetLambdar(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetD", _wrap_CGPkronSumCache_rgetD, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetD(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetYrotPart", _wrap_CGPkronSumCache_rgetYrotPart, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetYrotPart(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetYrot", _wrap_CGPkronSumCache_rgetYrot, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetYrot(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_rgetYtilde", _wrap_CGPkronSumCache_rgetYtilde, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_rgetYtilde(CGPkronSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetSsigma", _wrap_CGPkronSumCache_argetSsigma, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetSsigma(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetScstar", _wrap_CGPkronSumCache_argetScstar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetScstar(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetUcstar", _wrap_CGPkronSumCache_argetUcstar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetUcstar(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetLambdac", _wrap_CGPkronSumCache_argetLambdac, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetLambdac(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetSomega", _wrap_CGPkronSumCache_argetSomega, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetSomega(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetSrstar", _wrap_CGPkronSumCache_argetSrstar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetSrstar(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetUrstar", _wrap_CGPkronSumCache_argetUrstar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetUrstar(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetLambdar", _wrap_CGPkronSumCache_argetLambdar, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetLambdar(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetD", _wrap_CGPkronSumCache_argetD, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetD(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetYrotPart", _wrap_CGPkronSumCache_argetYrotPart, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetYrotPart(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetYrot", _wrap_CGPkronSumCache_argetYrot, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetYrot(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_argetYtilde", _wrap_CGPkronSumCache_argetYtilde, METH_VARARGS, (char *)"\n"
		"CGPkronSumCache_argetYtilde(CGPkronSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPkronSumCache_swigregister", CGPkronSumCache_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CGPkronSum", _wrap_new_CGPkronSum, METH_VARARGS, (char *)"\n"
		"new_CGPkronSum(MatrixXd const & Y, limix::PCovarianceFunction covarr1, limix::PCovarianceFunction covarc1, limix::PCovarianceFunction covarr2, limix::PCovarianceFunction covarc2, limix::PLikelihood lik, limix::PDataTerm dataTerm) -> CGPkronSum\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd const &\n"
		"covarr1: limix::PCovarianceFunction\n"
		"covarc1: limix::PCovarianceFunction\n"
		"covarr2: limix::PCovarianceFunction\n"
		"covarc2: limix::PCovarianceFunction\n"
		"lik: limix::PLikelihood\n"
		"dataTerm: limix::PDataTerm\n"
		"\n"
		""},
	 { (char *)"delete_CGPkronSum", _wrap_delete_CGPkronSum, METH_VARARGS, (char *)"\n"
		"delete_CGPkronSum(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_setLambda", _wrap_CGPkronSum_setLambda, METH_VARARGS, (char *)"\n"
		"CGPkronSum_setLambda(CGPkronSum self, limix::mfloat_t arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"lambda: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_setLambdaG", _wrap_CGPkronSum_setLambdaG, METH_VARARGS, (char *)"\n"
		"CGPkronSum_setLambdaG(CGPkronSum self, limix::mfloat_t arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"lambda: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_setLambdaN", _wrap_CGPkronSum_setLambdaN, METH_VARARGS, (char *)"\n"
		"CGPkronSum_setLambdaN(CGPkronSum self, limix::mfloat_t arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"lambda: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getParamBounds", _wrap_CGPkronSum_getParamBounds, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getParamBounds(CGPkronSum self, bool upper) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum const *\n"
		"upper: bool\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getParamMask", _wrap_CGPkronSum_getParamMask, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getParamMask(CGPkronSum self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum const *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getCovarr1", _wrap_CGPkronSum_getCovarr1, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getCovarr1(CGPkronSum self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getCovarr2", _wrap_CGPkronSum_getCovarr2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getCovarr2(CGPkronSum self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getCovarc1", _wrap_CGPkronSum_getCovarc1, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getCovarc1(CGPkronSum self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getCovarc2", _wrap_CGPkronSum_getCovarc2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getCovarc2(CGPkronSum self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetKEffInvYCache", _wrap_CGPkronSum_agetKEffInvYCache, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetKEffInvYCache(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_LML", _wrap_CGPkronSum_LML, METH_VARARGS, (char *)"\n"
		"CGPkronSum_LML(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_LMLgrad", _wrap_CGPkronSum_LMLgrad, METH_VARARGS, (char *)"\n"
		"CGPkronSum_LMLgrad(CGPkronSum self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_aLMLgrad_covarc1", _wrap_CGPkronSum_aLMLgrad_covarc1, METH_VARARGS, (char *)"\n"
		"CGPkronSum_aLMLgrad_covarc1(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_aLMLgrad_covarc2", _wrap_CGPkronSum_aLMLgrad_covarc2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_aLMLgrad_covarc2(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_aLMLgrad_covarr1", _wrap_CGPkronSum_aLMLgrad_covarr1, METH_VARARGS, (char *)"\n"
		"CGPkronSum_aLMLgrad_covarr1(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_aLMLgrad_covarr2", _wrap_CGPkronSum_aLMLgrad_covarr2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_aLMLgrad_covarr2(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_aLMLgrad_dataTerm", _wrap_CGPkronSum_aLMLgrad_dataTerm, METH_VARARGS, (char *)"\n"
		"CGPkronSum_aLMLgrad_dataTerm(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_aLMLhess_c1c1", _wrap_CGPkronSum_aLMLhess_c1c1, METH_VARARGS, (char *)"\n"
		"CGPkronSum_aLMLhess_c1c1(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetSc", _wrap_CGPkronSum_agetSc, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetSc(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetUc", _wrap_CGPkronSum_agetUc, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetUc(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetSr", _wrap_CGPkronSum_agetSr, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetSr(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetUr", _wrap_CGPkronSum_agetUr, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetUr(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetSsigma", _wrap_CGPkronSum_agetSsigma, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetSsigma(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetUsigma", _wrap_CGPkronSum_agetUsigma, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetUsigma(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetSomega", _wrap_CGPkronSum_agetSomega, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetSomega(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetUomega", _wrap_CGPkronSum_agetUomega, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetUomega(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetScstar", _wrap_CGPkronSum_agetScstar, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetScstar(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetUcstar", _wrap_CGPkronSum_agetUcstar, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetUcstar(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetSrstar", _wrap_CGPkronSum_agetSrstar, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetSrstar(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetUrstar", _wrap_CGPkronSum_agetUrstar, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetUrstar(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetLambdac", _wrap_CGPkronSum_agetLambdac, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetLambdac(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetLambdar", _wrap_CGPkronSum_agetLambdar, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetLambdar(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetYrotPart", _wrap_CGPkronSum_agetYrotPart, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetYrotPart(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetYrot", _wrap_CGPkronSum_agetYrot, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetYrot(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_agetCstar", _wrap_CGPkronSum_agetCstar, METH_VARARGS, (char *)"\n"
		"CGPkronSum_agetCstar(CGPkronSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getN", _wrap_CGPkronSum_getN, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getN(CGPkronSum self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getP", _wrap_CGPkronSum_getP, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getP(CGPkronSum self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_setDebugMode", _wrap_CGPkronSum_setDebugMode, METH_VARARGS, (char *)"\n"
		"CGPkronSum_setDebugMode(CGPkronSum self, bool debug)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"debug: bool\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtSVDcols", _wrap_CGPkronSum_getRtSVDcols, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtSVDcols(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtSVDrows", _wrap_CGPkronSum_getRtSVDrows, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtSVDrows(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLambdac", _wrap_CGPkronSum_getRtLambdac, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLambdac(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLambdar", _wrap_CGPkronSum_getRtLambdar, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLambdar(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtD", _wrap_CGPkronSum_getRtD, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtD(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtYrotPart", _wrap_CGPkronSum_getRtYrotPart, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtYrotPart(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtYrot", _wrap_CGPkronSum_getRtYrot, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtYrot(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtYtilde", _wrap_CGPkronSum_getRtYtilde, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtYtilde(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC1part1a", _wrap_CGPkronSum_getRtCC1part1a, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC1part1a(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC1part1b", _wrap_CGPkronSum_getRtCC1part1b, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC1part1b(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC1part1c", _wrap_CGPkronSum_getRtCC1part1c, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC1part1c(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC1part1d", _wrap_CGPkronSum_getRtCC1part1d, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC1part1d(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC1part1e", _wrap_CGPkronSum_getRtCC1part1e, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC1part1e(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC1part1f", _wrap_CGPkronSum_getRtCC1part1f, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC1part1f(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC1part2", _wrap_CGPkronSum_getRtCC1part2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC1part2(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC2part1", _wrap_CGPkronSum_getRtCC2part1, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC2part1(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCC2part2", _wrap_CGPkronSum_getRtCC2part2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCC2part2(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCR1part1a", _wrap_CGPkronSum_getRtCR1part1a, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCR1part1a(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCR1part1b", _wrap_CGPkronSum_getRtCR1part1b, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCR1part1b(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCR1part2", _wrap_CGPkronSum_getRtCR1part2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCR1part2(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCR2part1a", _wrap_CGPkronSum_getRtCR2part1a, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCR2part1a(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCR2part1b", _wrap_CGPkronSum_getRtCR2part1b, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCR2part1b(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtCR2part2", _wrap_CGPkronSum_getRtCR2part2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtCR2part2(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLMLgradCovar", _wrap_CGPkronSum_getRtLMLgradCovar, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLMLgradCovar(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLMLgradDataTerm", _wrap_CGPkronSum_getRtLMLgradDataTerm, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLMLgradDataTerm(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getIs_it", _wrap_CGPkronSum_getIs_it, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getIs_it(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtGrad", _wrap_CGPkronSum_getRtGrad, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtGrad(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLML1a", _wrap_CGPkronSum_getRtLML1a, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLML1a(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLML1b", _wrap_CGPkronSum_getRtLML1b, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLML1b(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLML1c", _wrap_CGPkronSum_getRtLML1c, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLML1c(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLML1d", _wrap_CGPkronSum_getRtLML1d, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLML1d(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLML1e", _wrap_CGPkronSum_getRtLML1e, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLML1e(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLML2", _wrap_CGPkronSum_getRtLML2, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLML2(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLML3", _wrap_CGPkronSum_getRtLML3, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLML3(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_getRtLML4", _wrap_CGPkronSum_getRtLML4, METH_VARARGS, (char *)"\n"
		"CGPkronSum_getRtLML4(CGPkronSum self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPkronSum *\n"
		"\n"
		""},
	 { (char *)"CGPkronSum_swigregister", CGPkronSum_swigregister, METH_VARARGS, NULL},
	 { (char *)"CGPSumCache_covar1_set", _wrap_CGPSumCache_covar1_set, METH_VARARGS, (char *)"\n"
		"CGPSumCache_covar1_set(CGPSumCache self, limix::PCovarianceFunctionCacheOld const & covar1)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"covar1: limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_covar1_get", _wrap_CGPSumCache_covar1_get, METH_VARARGS, (char *)"\n"
		"CGPSumCache_covar1_get(CGPSumCache self) -> limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_covar2_set", _wrap_CGPSumCache_covar2_set, METH_VARARGS, (char *)"\n"
		"CGPSumCache_covar2_set(CGPSumCache self, limix::PCovarianceFunctionCacheOld const & covar2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"covar2: limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_covar2_get", _wrap_CGPSumCache_covar2_get, METH_VARARGS, (char *)"\n"
		"CGPSumCache_covar2_get(CGPSumCache self) -> limix::PCovarianceFunctionCacheOld const &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"new_CGPSumCache", _wrap_new_CGPSumCache, METH_VARARGS, (char *)"\n"
		"new_CGPSumCache(CGPSum gp) -> CGPSumCache\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gp: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"delete_CGPSumCache", _wrap_delete_CGPSumCache, METH_VARARGS, (char *)"\n"
		"delete_CGPSumCache(CGPSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_rgetScstar", _wrap_CGPSumCache_rgetScstar, METH_VARARGS, (char *)"\n"
		"CGPSumCache_rgetScstar(CGPSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_rgetUcstar", _wrap_CGPSumCache_rgetUcstar, METH_VARARGS, (char *)"\n"
		"CGPSumCache_rgetUcstar(CGPSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_rgetLambda", _wrap_CGPSumCache_rgetLambda, METH_VARARGS, (char *)"\n"
		"CGPSumCache_rgetLambda(CGPSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_rgetYrot", _wrap_CGPSumCache_rgetYrot, METH_VARARGS, (char *)"\n"
		"CGPSumCache_rgetYrot(CGPSumCache self) -> MatrixXd &\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_argetScstar", _wrap_CGPSumCache_argetScstar, METH_VARARGS, (char *)"\n"
		"CGPSumCache_argetScstar(CGPSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_argetUcstar", _wrap_CGPSumCache_argetUcstar, METH_VARARGS, (char *)"\n"
		"CGPSumCache_argetUcstar(CGPSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_argetLambda", _wrap_CGPSumCache_argetLambda, METH_VARARGS, (char *)"\n"
		"CGPSumCache_argetLambda(CGPSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_argetYrot", _wrap_CGPSumCache_argetYrot, METH_VARARGS, (char *)"\n"
		"CGPSumCache_argetYrot(CGPSumCache self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSumCache *\n"
		"\n"
		""},
	 { (char *)"CGPSumCache_swigregister", CGPSumCache_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CGPSum", _wrap_new_CGPSum, METH_VARARGS, (char *)"\n"
		"new_CGPSum(MatrixXd const & Y, limix::PCovarianceFunction covar1, limix::PCovarianceFunction covar2, limix::PLikelihood lik, limix::PDataTerm dataTerm) -> CGPSum\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd const &\n"
		"covar1: limix::PCovarianceFunction\n"
		"covar2: limix::PCovarianceFunction\n"
		"lik: limix::PLikelihood\n"
		"dataTerm: limix::PDataTerm\n"
		"\n"
		""},
	 { (char *)"delete_CGPSum", _wrap_delete_CGPSum, METH_VARARGS, (char *)"\n"
		"delete_CGPSum(CGPSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_setX1", _wrap_CGPSum_setX1, METH_VARARGS, (char *)"\n"
		"CGPSum_setX1(CGPSum self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CGPSum_setX2", _wrap_CGPSum_setX2, METH_VARARGS, (char *)"\n"
		"CGPSum_setX2(CGPSum self, limix::CovarInput const & X)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"X: limix::CovarInput const &\n"
		"\n"
		""},
	 { (char *)"CGPSum_setY", _wrap_CGPSum_setY, METH_VARARGS, (char *)"\n"
		"CGPSum_setY(CGPSum self, MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"Y: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CGPSum_setCovar1", _wrap_CGPSum_setCovar1, METH_VARARGS, (char *)"\n"
		"CGPSum_setCovar1(CGPSum self, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CGPSum_setCovar2", _wrap_CGPSum_setCovar2, METH_VARARGS, (char *)"\n"
		"CGPSum_setCovar2(CGPSum self, limix::PCovarianceFunction covar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"covar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CGPSum_getCovar1", _wrap_CGPSum_getCovar1, METH_VARARGS, (char *)"\n"
		"CGPSum_getCovar1(CGPSum self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_getCovar2", _wrap_CGPSum_getCovar2, METH_VARARGS, (char *)"\n"
		"CGPSum_getCovar2(CGPSum self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_agetScstar", _wrap_CGPSum_agetScstar, METH_VARARGS, (char *)"\n"
		"CGPSum_agetScstar(CGPSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_agetLambda", _wrap_CGPSum_agetLambda, METH_VARARGS, (char *)"\n"
		"CGPSum_agetLambda(CGPSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_agetYrot", _wrap_CGPSum_agetYrot, METH_VARARGS, (char *)"\n"
		"CGPSum_agetYrot(CGPSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_debugCache", _wrap_CGPSum_debugCache, METH_VARARGS, (char *)"\n"
		"CGPSum_debugCache(CGPSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_agetCache", _wrap_CGPSum_agetCache, METH_VARARGS, (char *)"\n"
		"CGPSum_agetCache(CGPSum self) -> limix::PGPSumCache\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_LML", _wrap_CGPSum_LML, METH_VARARGS, (char *)"\n"
		"LML() -> limix::mfloat_t\n"
		"LML(CGPHyperParams params) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"params: limix::CGPHyperParams const &\n"
		"\n"
		"CGPSum_LML(CGPSum self, VectorXd const & params) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"params: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CGPSum_LMLgrad", _wrap_CGPSum_LMLgrad, METH_VARARGS, (char *)"\n"
		"CGPSum_LMLgrad(CGPSum self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_LMLgrad_covar", _wrap_CGPSum_LMLgrad_covar, METH_VARARGS, (char *)"\n"
		"CGPSum_LMLgrad_covar(CGPSum self, bool cov1)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"cov1: bool\n"
		"\n"
		""},
	 { (char *)"CGPSum_aLMLgrad_covar1", _wrap_CGPSum_aLMLgrad_covar1, METH_VARARGS, (char *)"\n"
		"CGPSum_aLMLgrad_covar1(CGPSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_aLMLgrad_covar2", _wrap_CGPSum_aLMLgrad_covar2, METH_VARARGS, (char *)"\n"
		"CGPSum_aLMLgrad_covar2(CGPSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_aLMLgrad_dataTerm", _wrap_CGPSum_aLMLgrad_dataTerm, METH_VARARGS, (char *)"\n"
		"CGPSum_aLMLgrad_dataTerm(CGPSum self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPSum *\n"
		"\n"
		""},
	 { (char *)"CGPSum_swigregister", CGPSum_swigregister, METH_VARARGS, NULL},
	 { (char *)"DEFAULT_TOL_swigconstant", DEFAULT_TOL_swigconstant, METH_VARARGS, NULL},
	 { (char *)"new_CGPopt", _wrap_new_CGPopt, METH_VARARGS, (char *)"\n"
		"new_CGPopt(limix::PGPbase gp) -> CGPopt\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"gp: limix::PGPbase\n"
		"\n"
		""},
	 { (char *)"delete_CGPopt", _wrap_delete_CGPopt, METH_VARARGS, (char *)"\n"
		"delete_CGPopt(CGPopt self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"\n"
		""},
	 { (char *)"CGPopt_gradCheck", _wrap_CGPopt_gradCheck, METH_VARARGS, (char *)"\n"
		"gradCheck(limix::mfloat_t relchange=1E-5, limix::mfloat_t threshold=1E-2) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"relchange: limix::mfloat_t\n"
		"threshold: limix::mfloat_t\n"
		"\n"
		"gradCheck(limix::mfloat_t relchange=1E-5) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"relchange: limix::mfloat_t\n"
		"\n"
		"CGPopt_gradCheck(CGPopt self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"\n"
		""},
	 { (char *)"CGPopt_opt", _wrap_CGPopt_opt, METH_VARARGS, (char *)"\n"
		"CGPopt_opt(CGPopt self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"\n"
		""},
	 { (char *)"CGPopt_getParamMask", _wrap_CGPopt_getParamMask, METH_VARARGS, (char *)"\n"
		"CGPopt_getParamMask(CGPopt self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt const *\n"
		"\n"
		""},
	 { (char *)"CGPopt_setParamMask", _wrap_CGPopt_setParamMask, METH_VARARGS, (char *)"\n"
		"CGPopt_setParamMask(CGPopt self, CGPHyperParams filter)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"filter: limix::CGPHyperParams\n"
		"\n"
		""},
	 { (char *)"CGPopt_getTolerance", _wrap_CGPopt_getTolerance, METH_VARARGS, (char *)"\n"
		"CGPopt_getTolerance(CGPopt self) -> double\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt const *\n"
		"\n"
		""},
	 { (char *)"CGPopt_setTolerance", _wrap_CGPopt_setTolerance, METH_VARARGS, (char *)"\n"
		"setTolerance(double tol=1E-4)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"tol: double\n"
		"\n"
		"CGPopt_setTolerance(CGPopt self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"\n"
		""},
	 { (char *)"CGPopt_getNumEvaluations", _wrap_CGPopt_getNumEvaluations, METH_VARARGS, (char *)"\n"
		"CGPopt_getNumEvaluations(CGPopt self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"\n"
		""},
	 { (char *)"CGPopt_getOptBoundLower", _wrap_CGPopt_getOptBoundLower, METH_VARARGS, (char *)"\n"
		"CGPopt_getOptBoundLower(CGPopt self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt const *\n"
		"\n"
		""},
	 { (char *)"CGPopt_setOptBoundLower", _wrap_CGPopt_setOptBoundLower, METH_VARARGS, (char *)"\n"
		"CGPopt_setOptBoundLower(CGPopt self, CGPHyperParams optBoundLower)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"optBoundLower: limix::CGPHyperParams\n"
		"\n"
		""},
	 { (char *)"CGPopt_getOptBoundUpper", _wrap_CGPopt_getOptBoundUpper, METH_VARARGS, (char *)"\n"
		"CGPopt_getOptBoundUpper(CGPopt self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt const *\n"
		"\n"
		""},
	 { (char *)"CGPopt_setOptBoundUpper", _wrap_CGPopt_setOptBoundUpper, METH_VARARGS, (char *)"\n"
		"CGPopt_setOptBoundUpper(CGPopt self, CGPHyperParams optBoundUpper)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"optBoundUpper: limix::CGPHyperParams\n"
		"\n"
		""},
	 { (char *)"CGPopt_getOptStartParams", _wrap_CGPopt_getOptStartParams, METH_VARARGS, (char *)"\n"
		"CGPopt_getOptStartParams(CGPopt self) -> std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > >\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt const *\n"
		"\n"
		""},
	 { (char *)"CGPopt_setOptStartParams", _wrap_CGPopt_setOptStartParams, METH_VARARGS, (char *)"\n"
		"CGPopt_setOptStartParams(CGPopt self, std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > const & optStartParams)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"optStartParams: std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > const &\n"
		"\n"
		""},
	 { (char *)"CGPopt_addOptStartParams", _wrap_CGPopt_addOptStartParams, METH_VARARGS, (char *)"\n"
		"addOptStartParams(CGPHyperParams params)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"params: limix::CGPHyperParams const &\n"
		"\n"
		"CGPopt_addOptStartParams(CGPopt self, VectorXd const & paramArray)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"paramArray: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CGPopt_getOptParams", _wrap_CGPopt_getOptParams, METH_VARARGS, (char *)"\n"
		"CGPopt_getOptParams(CGPopt self) -> CGPHyperParams\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGPopt *\n"
		"\n"
		""},
	 { (char *)"CGPopt_swigregister", CGPopt_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_ALMM", _wrap_delete_ALMM, METH_VARARGS, (char *)"\n"
		"delete_ALMM(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"\n"
		""},
	 { (char *)"ALMM_getNumIntervals0", _wrap_ALMM_getNumIntervals0, METH_VARARGS, (char *)"\n"
		"ALMM_getNumIntervals0(ALMM self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_setNumIntervals0", _wrap_ALMM_setNumIntervals0, METH_VARARGS, (char *)"\n"
		"ALMM_setNumIntervals0(ALMM self, limix::muint_t num_intervals0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"num_intervals0: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"ALMM_setNumIntervalsAlt", _wrap_ALMM_setNumIntervalsAlt, METH_VARARGS, (char *)"\n"
		"ALMM_setNumIntervalsAlt(ALMM self, limix::muint_t num_intervalsAlt)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"num_intervalsAlt: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"ALMM_getNumIntervalsAlt", _wrap_ALMM_getNumIntervalsAlt, METH_VARARGS, (char *)"\n"
		"ALMM_getNumIntervalsAlt(ALMM self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_getLdeltamin0", _wrap_ALMM_getLdeltamin0, METH_VARARGS, (char *)"\n"
		"ALMM_getLdeltamin0(ALMM self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_setLdeltamin0", _wrap_ALMM_setLdeltamin0, METH_VARARGS, (char *)"\n"
		"ALMM_setLdeltamin0(ALMM self, limix::mfloat_t ldeltamin0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"ldeltamin0: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"ALMM_setLdeltaminAlt", _wrap_ALMM_setLdeltaminAlt, METH_VARARGS, (char *)"\n"
		"ALMM_setLdeltaminAlt(ALMM self, limix::mfloat_t ldeltaminAlt)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"ldeltaminAlt: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"ALMM_getLdeltaminAlt", _wrap_ALMM_getLdeltaminAlt, METH_VARARGS, (char *)"\n"
		"ALMM_getLdeltaminAlt(ALMM self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_getLdeltamaxAlt", _wrap_ALMM_getLdeltamaxAlt, METH_VARARGS, (char *)"\n"
		"ALMM_getLdeltamaxAlt(ALMM self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_setLdeltamaxAlt", _wrap_ALMM_setLdeltamaxAlt, METH_VARARGS, (char *)"\n"
		"ALMM_setLdeltamaxAlt(ALMM self, limix::mfloat_t ldeltamaxAlt)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"ldeltamaxAlt: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"ALMM_getLdeltamax0", _wrap_ALMM_getLdeltamax0, METH_VARARGS, (char *)"\n"
		"ALMM_getLdeltamax0(ALMM self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_setLdeltamax0", _wrap_ALMM_setLdeltamax0, METH_VARARGS, (char *)"\n"
		"ALMM_setLdeltamax0(ALMM self, limix::mfloat_t ldeltamax0)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"ldeltamax0: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"ALMM_setLdeltaInit", _wrap_ALMM_setLdeltaInit, METH_VARARGS, (char *)"\n"
		"ALMM_setLdeltaInit(ALMM self, limix::mfloat_t logdelta)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"logdelta: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"ALMM_getLdeltaInit", _wrap_ALMM_getLdeltaInit, METH_VARARGS, (char *)"\n"
		"ALMM_getLdeltaInit(ALMM self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_getNumSamples", _wrap_ALMM_getNumSamples, METH_VARARGS, (char *)"\n"
		"ALMM_getNumSamples(ALMM self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_getPheno", _wrap_ALMM_getPheno, METH_VARARGS, (char *)"\n"
		"ALMM_getPheno(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_getPv", _wrap_ALMM_getPv, METH_VARARGS, (char *)"\n"
		"ALMM_getPv(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_getSnps", _wrap_ALMM_getSnps, METH_VARARGS, (char *)"\n"
		"ALMM_getSnps(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_getCovs", _wrap_ALMM_getCovs, METH_VARARGS, (char *)"\n"
		"ALMM_getCovs(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_setCovs", _wrap_ALMM_setCovs, METH_VARARGS, (char *)"\n"
		"ALMM_setCovs(ALMM self, MatrixXd const & covs)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"covs: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"ALMM_setPheno", _wrap_ALMM_setPheno, METH_VARARGS, (char *)"\n"
		"ALMM_setPheno(ALMM self, MatrixXd const & pheno)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"pheno: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"ALMM_setSNPs", _wrap_ALMM_setSNPs, METH_VARARGS, (char *)"\n"
		"ALMM_setSNPs(ALMM self, MatrixXd const & snps)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"snps: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"ALMM_process", _wrap_ALMM_process, METH_VARARGS, (char *)"\n"
		"ALMM_process(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"\n"
		""},
	 { (char *)"ALMM_getK", _wrap_ALMM_getK, METH_VARARGS, (char *)"\n"
		"ALMM_getK(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_setK", _wrap_ALMM_setK, METH_VARARGS, (char *)"\n"
		"ALMM_setK(ALMM self, MatrixXd const & K)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"K: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"ALMM_setPermutation", _wrap_ALMM_setPermutation, METH_VARARGS, (char *)"\n"
		"ALMM_setPermutation(ALMM self, VectorXi const & perm)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"perm: VectorXi const &\n"
		"\n"
		""},
	 { (char *)"ALMM_getPermutation", _wrap_ALMM_getPermutation, METH_VARARGS, (char *)"\n"
		"ALMM_getPermutation(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_setVarcompApprox0", _wrap_ALMM_setVarcompApprox0, METH_VARARGS, (char *)"\n"
		"setVarcompApprox0(limix::mfloat_t ldeltamin0=-5, limix::mfloat_t ldeltamax0=5, limix::muint_t num_intervals0=100)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldeltamin0: limix::mfloat_t\n"
		"ldeltamax0: limix::mfloat_t\n"
		"num_intervals0: limix::muint_t\n"
		"\n"
		"setVarcompApprox0(limix::mfloat_t ldeltamin0=-5, limix::mfloat_t ldeltamax0=5)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldeltamin0: limix::mfloat_t\n"
		"ldeltamax0: limix::mfloat_t\n"
		"\n"
		"setVarcompApprox0(limix::mfloat_t ldeltamin0=-5)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldeltamin0: limix::mfloat_t\n"
		"\n"
		"ALMM_setVarcompApprox0(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"\n"
		""},
	 { (char *)"ALMM_setVarcompExact", _wrap_ALMM_setVarcompExact, METH_VARARGS, (char *)"\n"
		"setVarcompExact(limix::mfloat_t ldeltamin=-5, limix::mfloat_t ldeltamax=5, limix::muint_t num_intervals=100)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldeltamin: limix::mfloat_t\n"
		"ldeltamax: limix::mfloat_t\n"
		"num_intervals: limix::muint_t\n"
		"\n"
		"setVarcompExact(limix::mfloat_t ldeltamin=-5, limix::mfloat_t ldeltamax=5)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldeltamin: limix::mfloat_t\n"
		"ldeltamax: limix::mfloat_t\n"
		"\n"
		"setVarcompExact(limix::mfloat_t ldeltamin=-5)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldeltamin: limix::mfloat_t\n"
		"\n"
		"ALMM_setVarcompExact(ALMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"\n"
		""},
	 { (char *)"ALMM_getTestStatistics", _wrap_ALMM_getTestStatistics, METH_VARARGS, (char *)"\n"
		"ALMM_getTestStatistics(ALMM self) -> int\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM const *\n"
		"\n"
		""},
	 { (char *)"ALMM_setTestStatistics", _wrap_ALMM_setTestStatistics, METH_VARARGS, (char *)"\n"
		"ALMM_setTestStatistics(ALMM self, int testStatistics)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ALMM *\n"
		"testStatistics: int\n"
		"\n"
		""},
	 { (char *)"ALMM_swigregister", ALMM_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CLMM", _wrap_new_CLMM, METH_VARARGS, (char *)"new_CLMM() -> CLMM"},
	 { (char *)"delete_CLMM", _wrap_delete_CLMM, METH_VARARGS, (char *)"\n"
		"delete_CLMM(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_process", _wrap_CLMM_process, METH_VARARGS, (char *)"\n"
		"CLMM_process(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_updateDecomposition", _wrap_CLMM_updateDecomposition, METH_VARARGS, (char *)"\n"
		"CLMM_updateDecomposition(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_setKUS", _wrap_CLMM_setKUS, METH_VARARGS, (char *)"\n"
		"CLMM_setKUS(CLMM self, MatrixXd const & K, MatrixXd const & U, VectorXd const & S)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"K: MatrixXd const &\n"
		"U: MatrixXd const &\n"
		"S: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CLMM_setK", _wrap_CLMM_setK, METH_VARARGS, (char *)"\n"
		"setK(MatrixXd const & K, MatrixXd const & U, VectorXd const & S)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"K: MatrixXd const &\n"
		"U: MatrixXd const &\n"
		"S: VectorXd const &\n"
		"\n"
		"CLMM_setK(CLMM self, MatrixXd const & K)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"K: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CLMM_getNLL0", _wrap_CLMM_getNLL0, METH_VARARGS, (char *)"\n"
		"CLMM_getNLL0(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_getNLLAlt", _wrap_CLMM_getNLLAlt, METH_VARARGS, (char *)"\n"
		"CLMM_getNLLAlt(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_getFtests", _wrap_CLMM_getFtests, METH_VARARGS, (char *)"\n"
		"CLMM_getFtests(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_getLdeltaAlt", _wrap_CLMM_getLdeltaAlt, METH_VARARGS, (char *)"\n"
		"CLMM_getLdeltaAlt(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_getLdelta0", _wrap_CLMM_getLdelta0, METH_VARARGS, (char *)"\n"
		"CLMM_getLdelta0(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_getLSigma", _wrap_CLMM_getLSigma, METH_VARARGS, (char *)"\n"
		"CLMM_getLSigma(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_getBetaSNP", _wrap_CLMM_getBetaSNP, METH_VARARGS, (char *)"\n"
		"CLMM_getBetaSNP(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_getBetaSNPste", _wrap_CLMM_getBetaSNPste, METH_VARARGS, (char *)"\n"
		"CLMM_getBetaSNPste(CLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_setLdeltaInit", _wrap_CLMM_setLdeltaInit, METH_VARARGS, (char *)"\n"
		"CLMM_setLdeltaInit(CLMM self, limix::mfloat_t logdelta)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"logdelta: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"CLMM_getLdeltaInit", _wrap_CLMM_getLdeltaInit, METH_VARARGS, (char *)"\n"
		"CLMM_getLdeltaInit(CLMM self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"\n"
		""},
	 { (char *)"CLMM_isCalcStes", _wrap_CLMM_isCalcStes, METH_VARARGS, (char *)"\n"
		"CLMM_isCalcStes(CLMM self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM const *\n"
		"\n"
		""},
	 { (char *)"CLMM_setCalcStes", _wrap_CLMM_setCalcStes, METH_VARARGS, (char *)"\n"
		"CLMM_setCalcStes(CLMM self, bool calcStes)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CLMM *\n"
		"calcStes: bool\n"
		"\n"
		""},
	 { (char *)"CLMM_swigregister", CLMM_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CInteractLMM", _wrap_new_CInteractLMM, METH_VARARGS, (char *)"new_CInteractLMM() -> CInteractLMM"},
	 { (char *)"delete_CInteractLMM", _wrap_delete_CInteractLMM, METH_VARARGS, (char *)"\n"
		"delete_CInteractLMM(CInteractLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM *\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_setInter", _wrap_CInteractLMM_setInter, METH_VARARGS, (char *)"\n"
		"CInteractLMM_setInter(CInteractLMM self, MatrixXd const & Inter)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM *\n"
		"Inter: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_getInter", _wrap_CInteractLMM_getInter, METH_VARARGS, (char *)"\n"
		"CInteractLMM_getInter(CInteractLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM const *\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_setInter0", _wrap_CInteractLMM_setInter0, METH_VARARGS, (char *)"\n"
		"CInteractLMM_setInter0(CInteractLMM self, MatrixXd const & Inter)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM *\n"
		"Inter: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_agetInter0", _wrap_CInteractLMM_agetInter0, METH_VARARGS, (char *)"\n"
		"CInteractLMM_agetInter0(CInteractLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM const *\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_process", _wrap_CInteractLMM_process, METH_VARARGS, (char *)"\n"
		"CInteractLMM_process(CInteractLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM *\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_updateDecomposition", _wrap_CInteractLMM_updateDecomposition, METH_VARARGS, (char *)"\n"
		"CInteractLMM_updateDecomposition(CInteractLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM *\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_getInter0", _wrap_CInteractLMM_getInter0, METH_VARARGS, (char *)"\n"
		"CInteractLMM_getInter0(CInteractLMM self) -> MatrixXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM const *\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_isRefitDelta0Pheno", _wrap_CInteractLMM_isRefitDelta0Pheno, METH_VARARGS, (char *)"\n"
		"CInteractLMM_isRefitDelta0Pheno(CInteractLMM self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM const *\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_setRefitDelta0Pheno", _wrap_CInteractLMM_setRefitDelta0Pheno, METH_VARARGS, (char *)"\n"
		"CInteractLMM_setRefitDelta0Pheno(CInteractLMM self, bool refitDelta0Pheno)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CInteractLMM *\n"
		"refitDelta0Pheno: bool\n"
		"\n"
		""},
	 { (char *)"CInteractLMM_swigregister", CInteractLMM_swigregister, METH_VARARGS, NULL},
	 { (char *)"train_associations_SingleSNP", _wrap_train_associations_SingleSNP, METH_VARARGS, (char *)"\n"
		"train_associations_SingleSNP(MatrixXd const & X, MatrixXd const & Y, MatrixXd const & U, MatrixXd const & S, MatrixXd const & C, int numintervals, double ldeltamin, double ldeltamax)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"X: MatrixXd const &\n"
		"Y: MatrixXd const &\n"
		"U: MatrixXd const &\n"
		"S: MatrixXd const &\n"
		"C: MatrixXd const &\n"
		"numintervals: int\n"
		"ldeltamin: double\n"
		"ldeltamax: double\n"
		"\n"
		""},
	 { (char *)"optdelta", _wrap_optdelta, METH_VARARGS, (char *)"\n"
		"optdelta(MatrixXd const & UY, MatrixXd const & UX, MatrixXd const & S, int numintervals, double ldeltamin, double ldeltamax, bool REML=False) -> double\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"UY: MatrixXd const &\n"
		"UX: MatrixXd const &\n"
		"S: MatrixXd const &\n"
		"numintervals: int\n"
		"ldeltamin: double\n"
		"ldeltamax: double\n"
		"REML: bool\n"
		"\n"
		"optdelta(MatrixXd const & UY, MatrixXd const & UX, MatrixXd const & S, int numintervals, double ldeltamin, double ldeltamax) -> double\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"UY: MatrixXd const &\n"
		"UX: MatrixXd const &\n"
		"S: MatrixXd const &\n"
		"numintervals: int\n"
		"ldeltamin: double\n"
		"ldeltamax: double\n"
		"\n"
		""},
	 { (char *)"optdeltaAllY", _wrap_optdeltaAllY, METH_VARARGS, (char *)"\n"
		"optdeltaAllY(MatrixXd const & UY, MatrixXd const & UX, MatrixXd const & S, MatrixXd const & ldeltagrid)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"UY: MatrixXd const &\n"
		"UX: MatrixXd const &\n"
		"S: MatrixXd const &\n"
		"ldeltagrid: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"nLLeval", _wrap_nLLeval, METH_VARARGS, (char *)"\n"
		"nLLeval(double ldelta, MatrixXd const & UY, MatrixXd const & UX, MatrixXd const & S, bool REML=False) -> double\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldelta: double\n"
		"UY: MatrixXd const &\n"
		"UX: MatrixXd const &\n"
		"S: MatrixXd const &\n"
		"REML: bool\n"
		"\n"
		"nLLeval(double ldelta, MatrixXd const & UY, MatrixXd const & UX, MatrixXd const & S) -> double\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldelta: double\n"
		"UY: MatrixXd const &\n"
		"UX: MatrixXd const &\n"
		"S: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"nLLevalAllY", _wrap_nLLevalAllY, METH_VARARGS, (char *)"\n"
		"nLLevalAllY(double ldelta, MatrixXd const & UY, MatrixXd const & UX, VectorXd const & S)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldelta: double\n"
		"UY: MatrixXd const &\n"
		"UX: MatrixXd const &\n"
		"S: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"new_nLLevalFunctor", _wrap_new_nLLevalFunctor, METH_VARARGS, (char *)"\n"
		"new_nLLevalFunctor(MatrixXd const Y, MatrixXd const X, MatrixXd const S, bool const REML) -> nLLevalFunctor\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd const\n"
		"X: MatrixXd const\n"
		"S: MatrixXd const\n"
		"REML: bool const\n"
		"\n"
		""},
	 { (char *)"delete_nLLevalFunctor", _wrap_delete_nLLevalFunctor, METH_VARARGS, (char *)"\n"
		"delete_nLLevalFunctor(nLLevalFunctor self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::nLLevalFunctor *\n"
		"\n"
		""},
	 { (char *)"nLLevalFunctor___call__", _wrap_nLLevalFunctor___call__, METH_VARARGS, (char *)"\n"
		"nLLevalFunctor___call__(nLLevalFunctor self, limix::mfloat_t const logdelta) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::nLLevalFunctor *\n"
		"logdelta: limix::mfloat_t const\n"
		"\n"
		""},
	 { (char *)"nLLevalFunctor_swigregister", nLLevalFunctor_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CKroneckerLMM", _wrap_new_CKroneckerLMM, METH_VARARGS, (char *)"new_CKroneckerLMM() -> CKroneckerLMM"},
	 { (char *)"delete_CKroneckerLMM", _wrap_delete_CKroneckerLMM, METH_VARARGS, (char *)"\n"
		"delete_CKroneckerLMM(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_process", _wrap_CKroneckerLMM_process, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_process(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_updateDecomposition", _wrap_CKroneckerLMM_updateDecomposition, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_updateDecomposition(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setK1r", _wrap_CKroneckerLMM_setK1r, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setK1r(CKroneckerLMM self, MatrixXd const & K1r)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"K1r: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setK1c", _wrap_CKroneckerLMM_setK1c, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setK1c(CKroneckerLMM self, MatrixXd const & K1c)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"K1c: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setK2r", _wrap_CKroneckerLMM_setK2r, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setK2r(CKroneckerLMM self, MatrixXd const & K2r)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"K2r: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setK2c", _wrap_CKroneckerLMM_setK2c, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setK2c(CKroneckerLMM self, MatrixXd const & K2c)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"K2c: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setPheno", _wrap_CKroneckerLMM_setPheno, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setPheno(CKroneckerLMM self, MatrixXd const & Y)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"Y: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setSNPs", _wrap_CKroneckerLMM_setSNPs, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setSNPs(CKroneckerLMM self, MatrixXd const & snps)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"snps: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setSNPcoldesign", _wrap_CKroneckerLMM_setSNPcoldesign, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setSNPcoldesign(CKroneckerLMM self, MatrixXd const & design)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"design: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setSNPcoldesign0_inter", _wrap_CKroneckerLMM_setSNPcoldesign0_inter, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setSNPcoldesign0_inter(CKroneckerLMM self, MatrixXd const & design)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"design: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setNumIntervals0_inter", _wrap_CKroneckerLMM_setNumIntervals0_inter, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_setNumIntervals0_inter(CKroneckerLMM self, limix::muint_t num_intervals0_inter)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"num_intervals0_inter: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_getNumIntervals0_inter", _wrap_CKroneckerLMM_getNumIntervals0_inter, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_getNumIntervals0_inter(CKroneckerLMM self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_getNLL0", _wrap_CKroneckerLMM_getNLL0, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_getNLL0(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_agetNLL0_inter", _wrap_CKroneckerLMM_agetNLL0_inter, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_agetNLL0_inter(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_getNLLAlt", _wrap_CKroneckerLMM_getNLLAlt, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_getNLLAlt(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_getLdeltaAlt", _wrap_CKroneckerLMM_getLdeltaAlt, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_getLdeltaAlt(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_getLdelta0", _wrap_CKroneckerLMM_getLdelta0, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_getLdelta0(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_agetLdelta0_inter", _wrap_CKroneckerLMM_agetLdelta0_inter, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_agetLdelta0_inter(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_getBetaSNP", _wrap_CKroneckerLMM_getBetaSNP, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_getBetaSNP(CKroneckerLMM self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_addCovariates", _wrap_CKroneckerLMM_addCovariates, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_addCovariates(CKroneckerLMM self, MatrixXd const & covR, MatrixXd const & covCol)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"covR: MatrixXd const &\n"
		"covCol: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_setCovariates", _wrap_CKroneckerLMM_setCovariates, METH_VARARGS, (char *)"\n"
		"setCovariates(MatrixXdVec covsR, MatrixXdVec covsCol)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"covsR: limix::MatrixXdVec const &\n"
		"covsCol: limix::MatrixXdVec const &\n"
		"\n"
		"CKroneckerLMM_setCovariates(CKroneckerLMM self, limix::muint_t index, MatrixXd const & covR, MatrixXd const & covC)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CKroneckerLMM *\n"
		"index: limix::muint_t\n"
		"covR: MatrixXd const &\n"
		"covC: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_nLLeval", _wrap_CKroneckerLMM_nLLeval, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_nLLeval(limix::mfloat_t ldelta, MatrixXdVec A, MatrixXdVec X, MatrixXd const & Y, VectorXd const & S_C1, VectorXd const & S_R1, VectorXd const & S_C2, VectorXd const & S_R2, MatrixXd & W) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldelta: limix::mfloat_t\n"
		"A: limix::MatrixXdVec const &\n"
		"X: limix::MatrixXdVec const &\n"
		"Y: MatrixXd const &\n"
		"S_C1: VectorXd const &\n"
		"S_R1: VectorXd const &\n"
		"S_C2: VectorXd const &\n"
		"S_R2: VectorXd const &\n"
		"W: MatrixXd &\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_optdelta", _wrap_CKroneckerLMM_optdelta, METH_VARARGS, (char *)"\n"
		"CKroneckerLMM_optdelta(limix::mfloat_t & ldelta_opt, MatrixXdVec A, MatrixXdVec X, MatrixXd const & Y, VectorXd const & S_C1, VectorXd const & S_R1, VectorXd const & S_C2, VectorXd const & S_R2, limix::mfloat_t ldeltamin, limix::mfloat_t ldeltamax, limix::muint_t numintervals) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"ldelta_opt: limix::mfloat_t &\n"
		"A: limix::MatrixXdVec const &\n"
		"X: limix::MatrixXdVec const &\n"
		"Y: MatrixXd const &\n"
		"S_C1: VectorXd const &\n"
		"S_R1: VectorXd const &\n"
		"S_C2: VectorXd const &\n"
		"S_R2: VectorXd const &\n"
		"ldeltamin: limix::mfloat_t\n"
		"ldeltamax: limix::mfloat_t\n"
		"numintervals: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CKroneckerLMM_swigregister", CKroneckerLMM_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_nLLevalKronFunctor", _wrap_new_nLLevalKronFunctor, METH_VARARGS, (char *)"\n"
		"new_nLLevalKronFunctor(MatrixXdVec A, MatrixXdVec X, MatrixXd const Y, MatrixXd const S_C1, MatrixXd const S_R1, MatrixXd const S_C2, MatrixXd const S_R2, MatrixXd W) -> nLLevalKronFunctor\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"A: limix::MatrixXdVec const\n"
		"X: limix::MatrixXdVec const\n"
		"Y: MatrixXd const\n"
		"S_C1: MatrixXd const\n"
		"S_R1: MatrixXd const\n"
		"S_C2: MatrixXd const\n"
		"S_R2: MatrixXd const\n"
		"W: MatrixXd\n"
		"\n"
		""},
	 { (char *)"delete_nLLevalKronFunctor", _wrap_delete_nLLevalKronFunctor, METH_VARARGS, (char *)"\n"
		"delete_nLLevalKronFunctor(nLLevalKronFunctor self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::nLLevalKronFunctor *\n"
		"\n"
		""},
	 { (char *)"nLLevalKronFunctor___call__", _wrap_nLLevalKronFunctor___call__, METH_VARARGS, (char *)"\n"
		"nLLevalKronFunctor___call__(nLLevalKronFunctor self, limix::mfloat_t const logdelta) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::nLLevalKronFunctor *\n"
		"logdelta: limix::mfloat_t const\n"
		"\n"
		""},
	 { (char *)"nLLevalKronFunctor_swigregister", nLLevalKronFunctor_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_AVarianceTerm", _wrap_delete_AVarianceTerm, METH_VARARGS, (char *)"\n"
		"delete_AVarianceTerm(AVarianceTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getName", _wrap_AVarianceTerm_getName, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getName(AVarianceTerm self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getInfo", _wrap_AVarianceTerm_getInfo, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getInfo(AVarianceTerm self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_setSampleFilter", _wrap_AVarianceTerm_setSampleFilter, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_setSampleFilter(AVarianceTerm self, MatrixXb const & filter)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"filter: MatrixXb const &\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getNumberTraits", _wrap_AVarianceTerm_getNumberTraits, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getNumberTraits(AVarianceTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getNumberIndividuals", _wrap_AVarianceTerm_getNumberIndividuals, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getNumberIndividuals(AVarianceTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm const *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_setK", _wrap_AVarianceTerm_setK, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_setK(AVarianceTerm self, MatrixXd const & K)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"K: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getK", _wrap_AVarianceTerm_getK, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getK(AVarianceTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm const *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getKcf", _wrap_AVarianceTerm_getKcf, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getKcf(AVarianceTerm self) -> limix::PFixedCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getTraitCovar", _wrap_AVarianceTerm_getTraitCovar, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getTraitCovar(AVarianceTerm self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm const *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_setScales", _wrap_AVarianceTerm_setScales, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_setScales(AVarianceTerm self, VectorXd const & scales)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"scales: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getScales", _wrap_AVarianceTerm_getScales, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getScales(AVarianceTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm const *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getNumberScales", _wrap_AVarianceTerm_getNumberScales, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getNumberScales(AVarianceTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm const *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_initTerm", _wrap_AVarianceTerm_initTerm, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_initTerm(AVarianceTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_getCovariance", _wrap_AVarianceTerm_getCovariance, METH_VARARGS, (char *)"\n"
		"AVarianceTerm_getCovariance(AVarianceTerm self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AVarianceTerm const *\n"
		"\n"
		""},
	 { (char *)"AVarianceTerm_swigregister", AVarianceTerm_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CSingleTraitTerm", _wrap_new_CSingleTraitTerm, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm()\n"
		"new_CSingleTraitTerm(MatrixXd const & K) -> CSingleTraitTerm\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"K: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"delete_CSingleTraitTerm", _wrap_delete_CSingleTraitTerm, METH_VARARGS, (char *)"\n"
		"delete_CSingleTraitTerm(CSingleTraitTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_getName", _wrap_CSingleTraitTerm_getName, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_getName(CSingleTraitTerm self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_getInfo", _wrap_CSingleTraitTerm_getInfo, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_getInfo(CSingleTraitTerm self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_setSampleFilter", _wrap_CSingleTraitTerm_setSampleFilter, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_setSampleFilter(CSingleTraitTerm self, MatrixXb const & filter)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm *\n"
		"filter: MatrixXb const &\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_getNumberTraits", _wrap_CSingleTraitTerm_getNumberTraits, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_getNumberTraits(CSingleTraitTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_getTraitCovar", _wrap_CSingleTraitTerm_getTraitCovar, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_getTraitCovar(CSingleTraitTerm self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm const *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_setScales", _wrap_CSingleTraitTerm_setScales, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_setScales(CSingleTraitTerm self, VectorXd const & scales)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm *\n"
		"scales: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_getScales", _wrap_CSingleTraitTerm_getScales, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_getScales(CSingleTraitTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm const *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_getNumberScales", _wrap_CSingleTraitTerm_getNumberScales, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_getNumberScales(CSingleTraitTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm const *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_initTerm", _wrap_CSingleTraitTerm_initTerm, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_initTerm(CSingleTraitTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_getCovariance", _wrap_CSingleTraitTerm_getCovariance, METH_VARARGS, (char *)"\n"
		"CSingleTraitTerm_getCovariance(CSingleTraitTerm self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CSingleTraitTerm const *\n"
		"\n"
		""},
	 { (char *)"CSingleTraitTerm_swigregister", CSingleTraitTerm_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CMultiTraitTerm", _wrap_new_CMultiTraitTerm, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm(limix::muint_t P)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"P: limix::muint_t\n"
		"\n"
		"new_CMultiTraitTerm(limix::muint_t P, limix::PCovarianceFunction traitCovar, MatrixXd const & K) -> CMultiTraitTerm\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"P: limix::muint_t\n"
		"traitCovar: limix::PCovarianceFunction\n"
		"K: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"delete_CMultiTraitTerm", _wrap_delete_CMultiTraitTerm, METH_VARARGS, (char *)"\n"
		"delete_CMultiTraitTerm(CMultiTraitTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_getName", _wrap_CMultiTraitTerm_getName, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_getName(CMultiTraitTerm self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_getInfo", _wrap_CMultiTraitTerm_getInfo, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_getInfo(CMultiTraitTerm self) -> std::string\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_setSampleFilter", _wrap_CMultiTraitTerm_setSampleFilter, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_setSampleFilter(CMultiTraitTerm self, MatrixXb const & filter)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm *\n"
		"filter: MatrixXb const &\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_getNumberTraits", _wrap_CMultiTraitTerm_getNumberTraits, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_getNumberTraits(CMultiTraitTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_setTraitCovar", _wrap_CMultiTraitTerm_setTraitCovar, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_setTraitCovar(CMultiTraitTerm self, limix::PCovarianceFunction traitCovar)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm *\n"
		"traitCovar: limix::PCovarianceFunction\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_getTraitCovar", _wrap_CMultiTraitTerm_getTraitCovar, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_getTraitCovar(CMultiTraitTerm self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm const *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_setScales", _wrap_CMultiTraitTerm_setScales, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_setScales(CMultiTraitTerm self, VectorXd const & scales)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm *\n"
		"scales: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_getScales", _wrap_CMultiTraitTerm_getScales, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_getScales(CMultiTraitTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm const *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_getNumberScales", _wrap_CMultiTraitTerm_getNumberScales, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_getNumberScales(CMultiTraitTerm self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm const *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_initTerm", _wrap_CMultiTraitTerm_initTerm, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_initTerm(CMultiTraitTerm self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_getCovariance", _wrap_CMultiTraitTerm_getCovariance, METH_VARARGS, (char *)"\n"
		"CMultiTraitTerm_getCovariance(CMultiTraitTerm self) -> limix::PCovarianceFunction\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMultiTraitTerm const *\n"
		"\n"
		""},
	 { (char *)"CMultiTraitTerm_swigregister", CMultiTraitTerm_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CVarianceDecomposition", _wrap_new_CVarianceDecomposition, METH_VARARGS, (char *)"\n"
		"new_CVarianceDecomposition(MatrixXd const & pheno) -> CVarianceDecomposition\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"pheno: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"delete_CVarianceDecomposition", _wrap_delete_CVarianceDecomposition, METH_VARARGS, (char *)"\n"
		"delete_CVarianceDecomposition(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_clear", _wrap_CVarianceDecomposition_clear, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_clear(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_setPheno", _wrap_CVarianceDecomposition_setPheno, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_setPheno(CVarianceDecomposition self, MatrixXd const & pheno)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"pheno: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getPheno", _wrap_CVarianceDecomposition_getPheno, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getPheno(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getNumberTraits", _wrap_CVarianceDecomposition_getNumberTraits, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getNumberTraits(CVarianceDecomposition self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getNumberIndividuals", _wrap_CVarianceDecomposition_getNumberIndividuals, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getNumberIndividuals(CVarianceDecomposition self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_addFixedEffTerm", _wrap_CVarianceDecomposition_addFixedEffTerm, METH_VARARGS, (char *)"\n"
		"addFixedEffTerm(MatrixXd const & design, MatrixXd const & fixed)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"design: MatrixXd const &\n"
		"fixed: MatrixXd const &\n"
		"\n"
		"CVarianceDecomposition_addFixedEffTerm(CVarianceDecomposition self, MatrixXd const & F)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"F: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getFixed", _wrap_CVarianceDecomposition_getFixed, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getFixed(CVarianceDecomposition self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getDesign", _wrap_CVarianceDecomposition_getDesign, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getDesign(CVarianceDecomposition self, limix::muint_t const i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"i: limix::muint_t const\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_clearFixedEffs", _wrap_CVarianceDecomposition_clearFixedEffs, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_clearFixedEffs(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getNumberFixedEffs", _wrap_CVarianceDecomposition_getNumberFixedEffs, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getNumberFixedEffs(CVarianceDecomposition self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_addTerm", _wrap_CVarianceDecomposition_addTerm, METH_VARARGS, (char *)"\n"
		"addTerm(limix::PVarianceTerm term)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"term: limix::PVarianceTerm\n"
		"\n"
		"addTerm(MatrixXd const & K)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"K: MatrixXd const &\n"
		"\n"
		"CVarianceDecomposition_addTerm(CVarianceDecomposition self, limix::PCovarianceFunction traitCovar, MatrixXd const & K)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"traitCovar: limix::PCovarianceFunction\n"
		"K: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getTerm", _wrap_CVarianceDecomposition_getTerm, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getTerm(CVarianceDecomposition self, limix::muint_t i) -> limix::PVarianceTerm\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"i: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_clearTerms", _wrap_CVarianceDecomposition_clearTerms, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_clearTerms(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getNumberTerms", _wrap_CVarianceDecomposition_getNumberTerms, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getNumberTerms(CVarianceDecomposition self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_setScales", _wrap_CVarianceDecomposition_setScales, METH_VARARGS, (char *)"\n"
		"setScales(VectorXd const & scales)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"scales: VectorXd const &\n"
		"\n"
		"CVarianceDecomposition_setScales(CVarianceDecomposition self, limix::muint_t i, VectorXd const & scales)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition const *\n"
		"i: limix::muint_t\n"
		"scales: VectorXd const &\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getScales", _wrap_CVarianceDecomposition_getScales, METH_VARARGS, (char *)"\n"
		"getScales(limix::muint_t i)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i: limix::muint_t\n"
		"\n"
		"CVarianceDecomposition_getScales(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getNumberScales", _wrap_CVarianceDecomposition_getNumberScales, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getNumberScales(CVarianceDecomposition self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getGP", _wrap_CVarianceDecomposition_getGP, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getGP(CVarianceDecomposition self) -> limix::PGPbase\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getCovar", _wrap_CVarianceDecomposition_getCovar, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getCovar(CVarianceDecomposition self) -> limix::PSumCF\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getMean", _wrap_CVarianceDecomposition_getMean, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getMean(CVarianceDecomposition self) -> limix::PLinearMean\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_initGPparams", _wrap_CVarianceDecomposition_initGPparams, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_initGPparams(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_initGP", _wrap_CVarianceDecomposition_initGP, METH_VARARGS, (char *)"\n"
		"initGP(bool fast=False)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"fast: bool\n"
		"\n"
		"CVarianceDecomposition_initGP(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_initGPbase", _wrap_CVarianceDecomposition_initGPbase, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_initGPbase(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_initGPkronSum", _wrap_CVarianceDecomposition_initGPkronSum, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_initGPkronSum(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_trainGP", _wrap_CVarianceDecomposition_trainGP, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_trainGP(CVarianceDecomposition self) -> bool\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getFixedEffects", _wrap_CVarianceDecomposition_getFixedEffects, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getFixedEffects(CVarianceDecomposition self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getLML", _wrap_CVarianceDecomposition_getLML, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getLML(CVarianceDecomposition self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getLMLgrad", _wrap_CVarianceDecomposition_getLMLgrad, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getLMLgrad(CVarianceDecomposition self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getLMLgradGPbase", _wrap_CVarianceDecomposition_getLMLgradGPbase, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getLMLgradGPbase(CVarianceDecomposition self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_getLMLgradGPkronSum", _wrap_CVarianceDecomposition_getLMLgradGPkronSum, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_getLMLgradGPkronSum(CVarianceDecomposition self) -> limix::mfloat_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CVarianceDecomposition *\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_aestimateHeritability", _wrap_CVarianceDecomposition_aestimateHeritability, METH_VARARGS, (char *)"\n"
		"CVarianceDecomposition_aestimateHeritability(MatrixXd const & Y, MatrixXd const & fixed, MatrixXd const & K)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"Y: MatrixXd const &\n"
		"fixed: MatrixXd const &\n"
		"K: MatrixXd const &\n"
		"\n"
		""},
	 { (char *)"CVarianceDecomposition_swigregister", CVarianceDecomposition_swigregister, METH_VARARGS, NULL},
	 { (char *)"CHeaderMap_resize", _wrap_CHeaderMap_resize, METH_VARARGS, (char *)"\n"
		"CHeaderMap_resize(CHeaderMap self, limix::muint_t n)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CHeaderMap *\n"
		"n: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"CHeaderMap_setStr", _wrap_CHeaderMap_setStr, METH_VARARGS, (char *)"\n"
		"CHeaderMap_setStr(CHeaderMap self, std::string name, limix::muint_t n, std::string value)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CHeaderMap *\n"
		"name: std::string\n"
		"n: limix::muint_t\n"
		"value: std::string\n"
		"\n"
		""},
	 { (char *)"CHeaderMap_copy", _wrap_CHeaderMap_copy, METH_VARARGS, (char *)"\n"
		"copy(limix::muint_t i_start, limix::muint_t n_elements) -> limix::PHeaderMap\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"i_start: limix::muint_t\n"
		"n_elements: limix::muint_t\n"
		"\n"
		"CHeaderMap_copy(CHeaderMap self, limix::muint_t n_elements) -> limix::PHeaderMap\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CHeaderMap *\n"
		"n_elements: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"new_CHeaderMap", _wrap_new_CHeaderMap, METH_VARARGS, (char *)"new_CHeaderMap() -> CHeaderMap"},
	 { (char *)"delete_CHeaderMap", _wrap_delete_CHeaderMap, METH_VARARGS, (char *)"\n"
		"delete_CHeaderMap(CHeaderMap self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CHeaderMap *\n"
		"\n"
		""},
	 { (char *)"CHeaderMap_swigregister", CHeaderMap_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CRMemDataFrameXd", _wrap_new_CRMemDataFrameXd, METH_VARARGS, (char *)"\n"
		"CRMemDataFrameXd()\n"
		"CRMemDataFrameXd(CRMemDataFrameXd copy)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"copy: limix::CRMemDataFrame< MatrixXd > const &\n"
		"\n"
		"new_CRMemDataFrameXd(std::shared_ptr< MatrixXd > M, limix::PHeaderMap rowHeader, limix::PHeaderMap colHeader) -> CRMemDataFrameXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"M: std::shared_ptr< MatrixXd >\n"
		"rowHeader: limix::PHeaderMap\n"
		"colHeader: limix::PHeaderMap\n"
		"\n"
		""},
	 { (char *)"delete_CRMemDataFrameXd", _wrap_delete_CRMemDataFrameXd, METH_VARARGS, (char *)"\n"
		"delete_CRMemDataFrameXd(CRMemDataFrameXd self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRMemDataFrame< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"CRMemDataFrameXd_getMatrix", _wrap_CRMemDataFrameXd_getMatrix, METH_VARARGS, (char *)"\n"
		"CRMemDataFrameXd_getMatrix(CRMemDataFrameXd self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRMemDataFrame< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"CRMemDataFrameXd_swigregister", CRMemDataFrameXd_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CRWMemDataFrameXd", _wrap_new_CRWMemDataFrameXd, METH_VARARGS, (char *)"\n"
		"CRWMemDataFrameXd()\n"
		"new_CRWMemDataFrameXd(CRMemDataFrameXd copy) -> CRWMemDataFrameXd\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"copy: limix::CRMemDataFrame< MatrixXd > const &\n"
		"\n"
		""},
	 { (char *)"delete_CRWMemDataFrameXd", _wrap_delete_CRWMemDataFrameXd, METH_VARARGS, (char *)"\n"
		"delete_CRWMemDataFrameXd(CRWMemDataFrameXd self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRWMemDataFrame< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"CRWMemDataFrameXd_setRowHeader", _wrap_CRWMemDataFrameXd_setRowHeader, METH_VARARGS, (char *)"\n"
		"CRWMemDataFrameXd_setRowHeader(CRWMemDataFrameXd self, limix::PHeaderMap arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRWMemDataFrame< MatrixXd > *\n"
		"in: limix::PHeaderMap\n"
		"\n"
		""},
	 { (char *)"CRWMemDataFrameXd_setColHeader", _wrap_CRWMemDataFrameXd_setColHeader, METH_VARARGS, (char *)"\n"
		"CRWMemDataFrameXd_setColHeader(CRWMemDataFrameXd self, limix::PHeaderMap arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRWMemDataFrame< MatrixXd > *\n"
		"in: limix::PHeaderMap\n"
		"\n"
		""},
	 { (char *)"CRWMemDataFrameXd_setMatrix", _wrap_CRWMemDataFrameXd_setMatrix, METH_VARARGS, (char *)"\n"
		"setMatrix(MatrixXd const & arg2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"in: MatrixXd const &\n"
		"\n"
		"CRWMemDataFrameXd_setMatrix(CRWMemDataFrameXd self, std::shared_ptr< MatrixXd > arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CRWMemDataFrame< MatrixXd > *\n"
		"in: std::shared_ptr< MatrixXd >\n"
		"\n"
		""},
	 { (char *)"CRWMemDataFrameXd_swigregister", CRWMemDataFrameXd_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_ARDataFrameXd", _wrap_delete_ARDataFrameXd, METH_VARARGS, (char *)"\n"
		"delete_ARDataFrameXd(ARDataFrameXd self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ARDataFrame< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"ARDataFrameXd_getMatrix", _wrap_ARDataFrameXd_getMatrix, METH_VARARGS, (char *)"\n"
		"ARDataFrameXd_getMatrix(ARDataFrameXd self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::ARDataFrame< MatrixXd > const *\n"
		"\n"
		""},
	 { (char *)"ARDataFrameXd_swigregister", ARDataFrameXd_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_AWDataFrameXd", _wrap_delete_AWDataFrameXd, METH_VARARGS, (char *)"\n"
		"delete_AWDataFrameXd(AWDataFrameXd self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AWDataFrame< MatrixXd > *\n"
		"\n"
		""},
	 { (char *)"AWDataFrameXd_setRowHeader", _wrap_AWDataFrameXd_setRowHeader, METH_VARARGS, (char *)"\n"
		"AWDataFrameXd_setRowHeader(AWDataFrameXd self, limix::PHeaderMap arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AWDataFrame< MatrixXd > *\n"
		"in: limix::PHeaderMap\n"
		"\n"
		""},
	 { (char *)"AWDataFrameXd_setColHeader", _wrap_AWDataFrameXd_setColHeader, METH_VARARGS, (char *)"\n"
		"AWDataFrameXd_setColHeader(AWDataFrameXd self, limix::PHeaderMap arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AWDataFrame< MatrixXd > *\n"
		"in: limix::PHeaderMap\n"
		"\n"
		""},
	 { (char *)"AWDataFrameXd_setMatrix", _wrap_AWDataFrameXd_setMatrix, METH_VARARGS, (char *)"\n"
		"setMatrix(MatrixXd const & arg2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"in: MatrixXd const &\n"
		"\n"
		"AWDataFrameXd_setMatrix(AWDataFrameXd self, std::shared_ptr< MatrixXd > arg3)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AWDataFrame< MatrixXd > *\n"
		"in: std::shared_ptr< MatrixXd >\n"
		"\n"
		""},
	 { (char *)"AWDataFrameXd_swigregister", AWDataFrameXd_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_AGenotypeContainer", _wrap_delete_AGenotypeContainer, METH_VARARGS, (char *)"\n"
		"delete_AGenotypeContainer(AGenotypeContainer self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AGenotypeContainer *\n"
		"\n"
		""},
	 { (char *)"AGenotypeContainer_setSNPFilter", _wrap_AGenotypeContainer_setSNPFilter, METH_VARARGS, (char *)"\n"
		"AGenotypeContainer_setSNPFilter(AGenotypeContainer self, std::string chrom, limix::muint_t start, limix::muint_t stop)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AGenotypeContainer *\n"
		"chrom: std::string\n"
		"start: limix::muint_t\n"
		"stop: limix::muint_t\n"
		"\n"
		""},
	 { (char *)"AGenotypeContainer_read", _wrap_AGenotypeContainer_read, METH_VARARGS, (char *)"\n"
		"read(limix::mint_t num_snps=-1) -> limix::PGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"num_snps: limix::mint_t\n"
		"\n"
		"AGenotypeContainer_read(AGenotypeContainer self) -> limix::PGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::AGenotypeContainer *\n"
		"\n"
		""},
	 { (char *)"AGenotypeContainer_swigregister", AGenotypeContainer_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CGenotypeBlock", _wrap_new_CGenotypeBlock, METH_VARARGS, (char *)"\n"
		"CGenotypeBlock()\n"
		"CGenotypeBlock(StringVec row_header_names, StringVec col_header_names, limix::muint_t rows, limix::muint_t cols)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"row_header_names: limix::stringVec const &\n"
		"col_header_names: limix::stringVec const &\n"
		"rows: limix::muint_t\n"
		"cols: limix::muint_t\n"
		"\n"
		"CGenotypeBlock(CGenotypeBlock copy)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"copy: limix::CGenotypeBlock const &\n"
		"\n"
		"new_CGenotypeBlock(PMatrixXd geno, PVectorXi pos, limix::PHeaderMap row_header, limix::PHeaderMap col_header) -> CGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"geno: PMatrixXd\n"
		"pos: PVectorXi\n"
		"row_header: limix::PHeaderMap\n"
		"col_header: limix::PHeaderMap\n"
		"\n"
		""},
	 { (char *)"delete_CGenotypeBlock", _wrap_delete_CGenotypeBlock, METH_VARARGS, (char *)"\n"
		"delete_CGenotypeBlock(CGenotypeBlock self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGenotypeBlock *\n"
		"\n"
		""},
	 { (char *)"CGenotypeBlock_numSample", _wrap_CGenotypeBlock_numSample, METH_VARARGS, (char *)"\n"
		"CGenotypeBlock_numSample(CGenotypeBlock self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGenotypeBlock *\n"
		"\n"
		""},
	 { (char *)"CGenotypeBlock_numSNPs", _wrap_CGenotypeBlock_numSNPs, METH_VARARGS, (char *)"\n"
		"CGenotypeBlock_numSNPs(CGenotypeBlock self) -> limix::muint_t\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGenotypeBlock *\n"
		"\n"
		""},
	 { (char *)"CGenotypeBlock_getPosition", _wrap_CGenotypeBlock_getPosition, METH_VARARGS, (char *)"\n"
		"CGenotypeBlock_getPosition(CGenotypeBlock self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGenotypeBlock const *\n"
		"\n"
		""},
	 { (char *)"CGenotypeBlock_read", _wrap_CGenotypeBlock_read, METH_VARARGS, (char *)"\n"
		"read(limix::mint_t num_snps=-1) -> limix::PGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"num_snps: limix::mint_t\n"
		"\n"
		"CGenotypeBlock_read(CGenotypeBlock self) -> limix::PGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CGenotypeBlock *\n"
		"\n"
		""},
	 { (char *)"CGenotypeBlock_swigregister", CGenotypeBlock_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CTextfileGenotypeContainer", _wrap_new_CTextfileGenotypeContainer, METH_VARARGS, (char *)"\n"
		"new_CTextfileGenotypeContainer(std::string const & filename) -> CTextfileGenotypeContainer\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"filename: std::string const &\n"
		"\n"
		""},
	 { (char *)"delete_CTextfileGenotypeContainer", _wrap_delete_CTextfileGenotypeContainer, METH_VARARGS, (char *)"\n"
		"delete_CTextfileGenotypeContainer(CTextfileGenotypeContainer self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CTextfileGenotypeContainer *\n"
		"\n"
		""},
	 { (char *)"CTextfileGenotypeContainer_read", _wrap_CTextfileGenotypeContainer_read, METH_VARARGS, (char *)"\n"
		"read(limix::mint_t num_snps=-1) -> limix::PGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"num_snps: limix::mint_t\n"
		"\n"
		"CTextfileGenotypeContainer_read(CTextfileGenotypeContainer self) -> limix::PGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CTextfileGenotypeContainer *\n"
		"\n"
		""},
	 { (char *)"CTextfileGenotypeContainer_swigregister", CTextfileGenotypeContainer_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_CMemGenotypeContainer", _wrap_new_CMemGenotypeContainer, METH_VARARGS, (char *)"\n"
		"new_CMemGenotypeContainer(limix::PGenotypeBlock block) -> CMemGenotypeContainer\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"block: limix::PGenotypeBlock\n"
		"\n"
		""},
	 { (char *)"delete_CMemGenotypeContainer", _wrap_delete_CMemGenotypeContainer, METH_VARARGS, (char *)"\n"
		"delete_CMemGenotypeContainer(CMemGenotypeContainer self)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMemGenotypeContainer *\n"
		"\n"
		""},
	 { (char *)"CMemGenotypeContainer_read", _wrap_CMemGenotypeContainer_read, METH_VARARGS, (char *)"\n"
		"read(limix::mint_t num_snps=-1) -> limix::PGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"num_snps: limix::mint_t\n"
		"\n"
		"CMemGenotypeContainer_read(CMemGenotypeContainer self) -> limix::PGenotypeBlock\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"self: limix::CMemGenotypeContainer *\n"
		"\n"
		""},
	 { (char *)"CMemGenotypeContainer_swigregister", CMemGenotypeContainer_swigregister, METH_VARARGS, NULL},
	 { (char *)"best_split_full_model", _wrap_best_split_full_model, METH_VARARGS, (char *)"\n"
		"best_split_full_model(MatrixXd const & X, MatrixXd const & UTy, MatrixXd const & C, MatrixXd const & S, MatrixXd const & U, VectorXi const & noderange, limix::mfloat_t delta)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"X: MatrixXd const &\n"
		"UTy: MatrixXd const &\n"
		"C: MatrixXd const &\n"
		"S: MatrixXd const &\n"
		"U: MatrixXd const &\n"
		"noderange: VectorXi const &\n"
		"delta: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"predict_lmm_forest", _wrap_predict_lmm_forest, METH_VARARGS, (char *)"\n"
		"predict_lmm_forest(VectorXi const & tree_nodes, VectorXi const & left_children, VectorXi const & right_children, VectorXi const & best_predictor, MatrixXd const & mean, MatrixXd const & splitting_value, MatrixXd const & X, limix::mfloat_t depth)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"tree_nodes: VectorXi const &\n"
		"left_children: VectorXi const &\n"
		"right_children: VectorXi const &\n"
		"best_predictor: VectorXi const &\n"
		"mean: MatrixXd const &\n"
		"splitting_value: MatrixXd const &\n"
		"X: MatrixXd const &\n"
		"depth: limix::mfloat_t\n"
		"\n"
		""},
	 { (char *)"argOutSwigTest2", _wrap_argOutSwigTest2, METH_VARARGS, (char *)"\n"
		"argOutSwigTest2(limix::mint_t in1, limix::mint_t in2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"in1: limix::mint_t\n"
		"in2: limix::mint_t\n"
		"\n"
		""},
	 { (char *)"argOutSwigTest3", _wrap_argOutSwigTest3, METH_VARARGS, (char *)"\n"
		"argOutSwigTest3(limix::mint_t in1, limix::mint_t in2)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"in1: limix::mint_t\n"
		"in2: limix::mint_t\n"
		"\n"
		""},
	 { (char *)"argOutSwigTest4", _wrap_argOutSwigTest4, METH_VARARGS, (char *)"\n"
		"argOutSwigTest4(MatrixXd const & m)\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"m: MatrixXd const &\n"
		"\n"
		""},
	 { NULL, NULL, 0, NULL }
};


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

static void *_p_std__shared_ptrT_limix__CGPHyperParams_tTo_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< std::map< std::string,MatrixXd > >(*(std::shared_ptr< limix::CGPHyperParams > *)x);
}
static void *_p_std__shared_ptrT_limix__CGenotypeBlock_tTo_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CRMemDataFrame< MatrixXd > >(*(std::shared_ptr< limix::CGenotypeBlock > *)x);
}
static void *_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_tTo_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CRMemDataFrame< MatrixXd > >(*(std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > *)x);
}
static void *_p_limix__CGPSumTo_p_limix__CGPbase(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CGPbase *)  ((limix::CGPSum *) x));
}
static void *_p_limix__CGPkroneckerTo_p_limix__CGPbase(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CGPbase *)  ((limix::CGPkronecker *) x));
}
static void *_p_limix__CGPkronSumTo_p_limix__CGPbase(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CGPbase *)  ((limix::CGPkronSum *) x));
}
static void *_p_std__shared_ptrT_limix__CSqExpCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CSqExpCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovLinearISODelta_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CCovLinearISODelta > *)x);
}
static void *_p_std__shared_ptrT_limix__CPolyCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CPolyCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovSqexpARD_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CCovSqexpARD > *)x);
}
static void *_p_std__shared_ptrT_limix__CLowRankCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CLowRankCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovLinearISO_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CCovLinearISO > *)x);
}
static void *_p_std__shared_ptrT_limix__CFixedCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CFixedCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CFixedDiagonalCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CFixedDiagonalCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CDiagonalCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CDiagonalCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CProductCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CProductCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CRankOneCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CRankOneCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CFreeFormCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CFreeFormCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovLinearARD_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CCovLinearARD > *)x);
}
static void *_p_std__shared_ptrT_limix__CLinCombCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CLinCombCF > *)x);
}
static void *_p_std__shared_ptrT_limix__ALikelihood_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::ALikelihood > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalNULL_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CLikNormalNULL > *)x);
}
static void *_p_std__shared_ptrT_limix__CKroneckerCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CKroneckerCF > *)x);
}
static void *_p_std__shared_ptrT_limix__AMultiCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::AMultiCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CRank1diagCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CRank1diagCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CSumCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CSumCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalSVD_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CLikNormalSVD > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalIso_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ACovarianceFunction >(*(std::shared_ptr< limix::CLikNormalIso > *)x);
}
static void *_p_std__shared_ptrT_limix__CSingleTraitTerm_tTo_p_std__shared_ptrT_limix__AVarianceTerm_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::AVarianceTerm >(*(std::shared_ptr< limix::CSingleTraitTerm > *)x);
}
static void *_p_std__shared_ptrT_limix__CMultiTraitTerm_tTo_p_std__shared_ptrT_limix__AVarianceTerm_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::AVarianceTerm >(*(std::shared_ptr< limix::CMultiTraitTerm > *)x);
}
static void *_p_std__shared_ptrT_limix__CLinearMean_tTo_p_std__shared_ptrT_limix__ADataTerm_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ADataTerm >(*(std::shared_ptr< limix::CLinearMean > *)x);
}
static void *_p_std__shared_ptrT_limix__CKroneckerMean_tTo_p_std__shared_ptrT_limix__ADataTerm_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ADataTerm >(*(std::shared_ptr< limix::CKroneckerMean > *)x);
}
static void *_p_std__shared_ptrT_limix__CData_tTo_p_std__shared_ptrT_limix__ADataTerm_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ADataTerm >(*(std::shared_ptr< limix::CData > *)x);
}
static void *_p_std__shared_ptrT_limix__CSumLinear_tTo_p_std__shared_ptrT_limix__ADataTerm_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ADataTerm >(*(std::shared_ptr< limix::CSumLinear > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalNULL_tTo_p_std__shared_ptrT_limix__ALikelihood_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ALikelihood >(*(std::shared_ptr< limix::CLikNormalNULL > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalIso_tTo_p_std__shared_ptrT_limix__ALikelihood_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ALikelihood >(*(std::shared_ptr< limix::CLikNormalIso > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalSVD_tTo_p_std__shared_ptrT_limix__ALikelihood_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ALikelihood >(*(std::shared_ptr< limix::CLikNormalSVD > *)x);
}
static void *_p_limix__CLMMTo_p_limix__CLMMCore(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CLMMCore *)  ((limix::CLMM *) x));
}
static void *_p_limix__CInteractLMMTo_p_limix__CLMMCore(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CLMMCore *) (limix::CLMM *) ((limix::CInteractLMM *) x));
}
static void *_p_limix__CLMMKroneckerCoreTo_p_limix__CLMMCore(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CLMMCore *)  ((limix::CLMMKroneckerCore *) x));
}
static void *_p_limix__CKroneckerLMMTo_p_limix__CLMMCore(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CLMMCore *) (limix::CLMMKroneckerCore *) ((limix::CKroneckerLMM *) x));
}
static void *_p_std__shared_ptrT_limix__CGenotypeBlock_tTo_p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ARDataFrame< MatrixXd > >(*(std::shared_ptr< limix::CGenotypeBlock > *)x);
}
static void *_p_limix__CKroneckerLMMTo_p_limix__CLMMKroneckerCore(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CLMMKroneckerCore *)  ((limix::CKroneckerLMM *) x));
}
static void *_p_std__shared_ptrT_limix__CInteractLMM_tTo_p_std__shared_ptrT_limix__CLMM_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CLMM >(*(std::shared_ptr< limix::CInteractLMM > *)x);
}
static void *_p_limix__CGPHyperParamsTo_p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > > *)  ((limix::CGPHyperParams *) x));
}
static void *_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_tTo_p_std__shared_ptrT_limix__AGenotypeContainer_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::AGenotypeContainer >(*(std::shared_ptr< limix::CTextfileGenotypeContainer > *)x);
}
static void *_p_std__shared_ptrT_limix__CMemGenotypeContainer_tTo_p_std__shared_ptrT_limix__AGenotypeContainer_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::AGenotypeContainer >(*(std::shared_ptr< limix::CMemGenotypeContainer > *)x);
}
static void *_p_limix__CTextfileGenotypeContainerTo_p_limix__AGenotypeContainer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::AGenotypeContainer *)  ((limix::CTextfileGenotypeContainer *) x));
}
static void *_p_limix__CMemGenotypeContainerTo_p_limix__AGenotypeContainer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::AGenotypeContainer *)  ((limix::CMemGenotypeContainer *) x));
}
static void *_p_limix__CLinCombCFTo_p_limix__AMultiCF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::AMultiCF *)  ((limix::CLinCombCF *) x));
}
static void *_p_limix__CKroneckerCFTo_p_limix__AMultiCF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::AMultiCF *)  ((limix::CKroneckerCF *) x));
}
static void *_p_limix__CSumCFTo_p_limix__AMultiCF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::AMultiCF *)  ((limix::CSumCF *) x));
}
static void *_p_limix__CProductCFTo_p_limix__AMultiCF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::AMultiCF *)  ((limix::CProductCF *) x));
}
static void *_p_limix__CCovSqexpARDTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CCovSqexpARD *) x));
}
static void *_p_limix__CSumLinearTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ADataTerm *) ((limix::CSumLinear *) x));
}
static void *_p_limix__CLowRankCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CLowRankCF *) x));
}
static void *_p_limix__CCovLinearARDTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CCovLinearARD *) x));
}
static void *_p_limix__CGPCholCacheTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *)  ((limix::CGPCholCache *) x));
}
static void *_p_limix__CRankOneCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CRankOneCF *) x));
}
static void *_p_limix__CLinearMeanTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ADataTerm *) ((limix::CLinearMean *) x));
}
static void *_p_limix__CProductCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *)(limix::AMultiCF *) ((limix::CProductCF *) x));
}
static void *_p_limix__CLikNormalSVDTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *)(limix::ALikelihood *) ((limix::CLikNormalSVD *) x));
}
static void *_p_limix__ADataTermTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *)  ((limix::ADataTerm *) x));
}
static void *_p_limix__CDiagonalCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CDiagonalCF *) x));
}
static void *_p_limix__CFixedDiagonalCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CFixedDiagonalCF *) x));
}
static void *_p_limix__CGPKroneckerCacheTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *)  ((limix::CGPKroneckerCache *) x));
}
static void *_p_limix__CKroneckerMeanTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ADataTerm *)(limix::CLinearMean *) ((limix::CKroneckerMean *) x));
}
static void *_p_limix__CFixedCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CFixedCF *) x));
}
static void *_p_limix__CLinCombCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *)(limix::AMultiCF *) ((limix::CLinCombCF *) x));
}
static void *_p_limix__ALikelihoodTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::ALikelihood *) x));
}
static void *_p_limix__CRank1diagCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CRank1diagCF *) x));
}
static void *_p_limix__CLikNormalNULLTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *)(limix::ALikelihood *) ((limix::CLikNormalNULL *) x));
}
static void *_p_limix__AMultiCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::AMultiCF *) x));
}
static void *_p_limix__CCovLinearISOTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CCovLinearISO *) x));
}
static void *_p_limix__CGPSumCacheTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *)  ((limix::CGPSumCache *) x));
}
static void *_p_limix__CGPkronSumCacheTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *)  ((limix::CGPkronSumCache *) x));
}
static void *_p_limix__CCovarianceFunctionCacheOldTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *)  ((limix::CCovarianceFunctionCacheOld *) x));
}
static void *_p_limix__CPolyCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CPolyCF *) x));
}
static void *_p_limix__CKroneckerCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *)(limix::AMultiCF *) ((limix::CKroneckerCF *) x));
}
static void *_p_limix__CLikNormalIsoTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *)(limix::ALikelihood *) ((limix::CLikNormalIso *) x));
}
static void *_p_limix__CCovLinearISODeltaTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CCovLinearISODelta *) x));
}
static void *_p_limix__CNamedCacheTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *)  ((limix::CNamedCache *) x));
}
static void *_p_limix__CSqExpCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CSqExpCF *) x));
}
static void *_p_limix__CDataTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ADataTerm *) ((limix::CData *) x));
}
static void *_p_limix__CSumCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *)(limix::AMultiCF *) ((limix::CSumCF *) x));
}
static void *_p_limix__ACovarianceFunctionTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *)  ((limix::ACovarianceFunction *) x));
}
static void *_p_limix__CFreeFormCFTo_p_limix__CParamObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CParamObject *) (limix::ACovarianceFunction *) ((limix::CFreeFormCF *) x));
}
static void *_p_std__shared_ptrT_limix__CInteractLMM_tTo_p_std__shared_ptrT_limix__ALMM_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ALMM >(*(std::shared_ptr< limix::CInteractLMM > *)x);
}
static void *_p_std__shared_ptrT_limix__CLMM_tTo_p_std__shared_ptrT_limix__ALMM_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ALMM >(*(std::shared_ptr< limix::CLMM > *)x);
}
static void *_p_std__shared_ptrT_limix__CKroneckerLMM_tTo_p_std__shared_ptrT_limix__ALMM_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::ALMM >(*(std::shared_ptr< limix::CKroneckerLMM > *)x);
}
static void *_p_limix__CDataTo_p_limix__ADataTerm(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ADataTerm *)  ((limix::CData *) x));
}
static void *_p_limix__CLinearMeanTo_p_limix__ADataTerm(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ADataTerm *)  ((limix::CLinearMean *) x));
}
static void *_p_limix__CKroneckerMeanTo_p_limix__ADataTerm(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ADataTerm *) (limix::CLinearMean *) ((limix::CKroneckerMean *) x));
}
static void *_p_limix__CSumLinearTo_p_limix__ADataTerm(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ADataTerm *)  ((limix::CSumLinear *) x));
}
static void *_p_limix__CFixedCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CFixedCF *) x));
}
static void *_p_limix__CPolyCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CPolyCF *) x));
}
static void *_p_limix__CCovLinearISOTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CCovLinearISO *) x));
}
static void *_p_limix__CSqExpCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CSqExpCF *) x));
}
static void *_p_limix__CRank1diagCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CRank1diagCF *) x));
}
static void *_p_limix__CFreeFormCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CFreeFormCF *) x));
}
static void *_p_limix__CLikNormalSVDTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *) (limix::ALikelihood *) ((limix::CLikNormalSVD *) x));
}
static void *_p_limix__ALikelihoodTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::ALikelihood *) x));
}
static void *_p_limix__CFixedDiagonalCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CFixedDiagonalCF *) x));
}
static void *_p_limix__CDiagonalCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CDiagonalCF *) x));
}
static void *_p_limix__CSumCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *) (limix::AMultiCF *) ((limix::CSumCF *) x));
}
static void *_p_limix__CCovLinearISODeltaTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CCovLinearISODelta *) x));
}
static void *_p_limix__AMultiCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::AMultiCF *) x));
}
static void *_p_limix__CCovSqexpARDTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CCovSqexpARD *) x));
}
static void *_p_limix__CProductCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *) (limix::AMultiCF *) ((limix::CProductCF *) x));
}
static void *_p_limix__CKroneckerCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *) (limix::AMultiCF *) ((limix::CKroneckerCF *) x));
}
static void *_p_limix__CLikNormalNULLTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *) (limix::ALikelihood *) ((limix::CLikNormalNULL *) x));
}
static void *_p_limix__CCovLinearARDTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CCovLinearARD *) x));
}
static void *_p_limix__CRankOneCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CRankOneCF *) x));
}
static void *_p_limix__CLowRankCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *)  ((limix::CLowRankCF *) x));
}
static void *_p_limix__CLinCombCFTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *) (limix::AMultiCF *) ((limix::CLinCombCF *) x));
}
static void *_p_limix__CLikNormalIsoTo_p_limix__ACovarianceFunction(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ACovarianceFunction *) (limix::ALikelihood *) ((limix::CLikNormalIso *) x));
}
static void *_p_std__shared_ptrT_limix__ALikelihood_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::ALikelihood > *)x);
}
static void *_p_std__shared_ptrT_limix__CFreeFormCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CFreeFormCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalSVD_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CLikNormalSVD > *)x);
}
static void *_p_std__shared_ptrT_limix__CLowRankCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CLowRankCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CSumLinear_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CSumLinear > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalNULL_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CLikNormalNULL > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovLinearISODelta_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CCovLinearISODelta > *)x);
}
static void *_p_std__shared_ptrT_limix__CProductCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CProductCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CLikNormalIso_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CLikNormalIso > *)x);
}
static void *_p_std__shared_ptrT_limix__CDiagonalCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CDiagonalCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CFixedDiagonalCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CFixedDiagonalCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CFixedCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CFixedCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CKroneckerCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CKroneckerCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CRank1diagCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CRank1diagCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CPolyCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CPolyCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CLinCombCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CLinCombCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CSumCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CSumCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CRankOneCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CRankOneCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CData_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CData > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovLinearARD_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CCovLinearARD > *)x);
}
static void *_p_std__shared_ptrT_limix__AMultiCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::AMultiCF > *)x);
}
static void *_p_std__shared_ptrT_limix__ADataTerm_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::ADataTerm > *)x);
}
static void *_p_std__shared_ptrT_limix__CGPSumCache_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CGPSumCache > *)x);
}
static void *_p_std__shared_ptrT_limix__CGPkronSumCache_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CGPkronSumCache > *)x);
}
static void *_p_std__shared_ptrT_limix__CGPKroneckerCache_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CGPKroneckerCache > *)x);
}
static void *_p_std__shared_ptrT_limix__CGPCholCache_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CGPCholCache > *)x);
}
static void *_p_std__shared_ptrT_limix__CNamedCache_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CNamedCache > *)x);
}
static void *_p_std__shared_ptrT_limix__CKroneckerMean_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CKroneckerMean > *)x);
}
static void *_p_std__shared_ptrT_limix__CLinearMean_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CLinearMean > *)x);
}
static void *_p_std__shared_ptrT_limix__ACovarianceFunction_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::ACovarianceFunction > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovLinearISO_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CCovLinearISO > *)x);
}
static void *_p_std__shared_ptrT_limix__CSqExpCF_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CSqExpCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CCovarianceFunctionCacheOld > *)x);
}
static void *_p_std__shared_ptrT_limix__CCovSqexpARD_tTo_p_std__shared_ptrT_limix__CParamObject_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CParamObject >(*(std::shared_ptr< limix::CCovSqexpARD > *)x);
}
static void *_p_std__shared_ptrT_limix__CGPkronecker_tTo_p_std__shared_ptrT_limix__CGPbase_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CGPbase >(*(std::shared_ptr< limix::CGPkronecker > *)x);
}
static void *_p_std__shared_ptrT_limix__CGPSum_tTo_p_std__shared_ptrT_limix__CGPbase_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CGPbase >(*(std::shared_ptr< limix::CGPSum > *)x);
}
static void *_p_std__shared_ptrT_limix__CGPkronSum_tTo_p_std__shared_ptrT_limix__CGPbase_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CGPbase >(*(std::shared_ptr< limix::CGPkronSum > *)x);
}
static void *_p_limix__CLimixExceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *)  ((limix::CLimixException *) x));
}
static void *_p_limix__CSingleTraitTermTo_p_limix__AVarianceTerm(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::AVarianceTerm *)  ((limix::CSingleTraitTerm *) x));
}
static void *_p_limix__CMultiTraitTermTo_p_limix__AVarianceTerm(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::AVarianceTerm *)  ((limix::CMultiTraitTerm *) x));
}
static void *_p_std__shared_ptrT_limix__CProductCF_tTo_p_std__shared_ptrT_limix__AMultiCF_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::AMultiCF >(*(std::shared_ptr< limix::CProductCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CSumCF_tTo_p_std__shared_ptrT_limix__AMultiCF_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::AMultiCF >(*(std::shared_ptr< limix::CSumCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CKroneckerCF_tTo_p_std__shared_ptrT_limix__AMultiCF_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::AMultiCF >(*(std::shared_ptr< limix::CKroneckerCF > *)x);
}
static void *_p_std__shared_ptrT_limix__CLinCombCF_tTo_p_std__shared_ptrT_limix__AMultiCF_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::AMultiCF >(*(std::shared_ptr< limix::CLinCombCF > *)x);
}
static void *_p_limix__CLMMTo_p_limix__ALMM(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ALMM *)  ((limix::CLMM *) x));
}
static void *_p_limix__CInteractLMMTo_p_limix__ALMM(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ALMM *) (limix::CLMM *) ((limix::CInteractLMM *) x));
}
static void *_p_limix__CKroneckerLMMTo_p_limix__ALMM(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ALMM *)  ((limix::CKroneckerLMM *) x));
}
static void *_p_limix__CInteractLMMTo_p_limix__CLMM(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CLMM *)  ((limix::CInteractLMM *) x));
}
static void *_p_limix__CKroneckerMeanTo_p_limix__CLinearMean(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CLinearMean *)  ((limix::CKroneckerMean *) x));
}
static void *_p_limix__CLikNormalIsoTo_p_limix__ALikelihood(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ALikelihood *)  ((limix::CLikNormalIso *) x));
}
static void *_p_limix__CLikNormalSVDTo_p_limix__ALikelihood(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ALikelihood *)  ((limix::CLikNormalSVD *) x));
}
static void *_p_limix__CLikNormalNULLTo_p_limix__ALikelihood(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ALikelihood *)  ((limix::CLikNormalNULL *) x));
}
static void *_p_std__shared_ptrT_limix__CKroneckerMean_tTo_p_std__shared_ptrT_limix__CLinearMean_t(void *x, int *newmemory) {
    *newmemory = SWIG_CAST_NEW_MEMORY;
    return (void *) new std::shared_ptr< limix::CLinearMean >(*(std::shared_ptr< limix::CKroneckerMean > *)x);
}
static void *_p_limix__CGenotypeBlockTo_p_limix__ARDataFrameT_MatrixXd_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::ARDataFrame< MatrixXd > *) (limix::CRMemDataFrame< MatrixXd > *) ((limix::CGenotypeBlock *) x));
}
static void *_p_limix__CGenotypeBlockTo_p_limix__CRMemDataFrameT_MatrixXd_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CRMemDataFrame< MatrixXd > *)  ((limix::CGenotypeBlock *) x));
}
static void *_p_limix__CRWMemDataFrameT_MatrixXd_tTo_p_limix__CRMemDataFrameT_MatrixXd_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((limix::CRMemDataFrame< MatrixXd > *)  ((limix::CRWMemDataFrame< MatrixXd > *) x));
}
static swig_type_info _swigt__p_MatrixXb = {"_p_MatrixXb", "MatrixXb *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_MatrixXd = {"_p_MatrixXd", "std::map< std::string,MatrixXd >::mapped_type *|std::vector< MatrixXd >::value_type *|limix::CovarInput *|MatrixXd *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_MatrixXdChol = {"_p_MatrixXdChol", "MatrixXdChol *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_MatrixXi = {"_p_MatrixXi", "MatrixXi *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_PCVoid = {"_p_PCVoid", "PCVoid *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_PMatrixXd = {"_p_PMatrixXd", "PMatrixXd *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_PVectorXi = {"_p_PVectorXi", "PVectorXi *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_VectorXd = {"_p_VectorXd", "VectorXd *|limix::CovarParams *|limix::LikParams *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_VectorXi = {"_p_VectorXi", "std::vector< VectorXi >::value_type *|VectorXi *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "limix::float64_t *|double *|limix::mfloat_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_float = {"_p_float", "limix::float32_t *|float *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__ACovarianceFunction = {"_p_limix__ACovarianceFunction", "limix::ACovarianceFunction *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__ADataTerm = {"_p_limix__ADataTerm", "limix::ADataTerm *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__AGenotypeContainer = {"_p_limix__AGenotypeContainer", "limix::AGenotypeContainer *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__ALMM = {"_p_limix__ALMM", "limix::ALMM *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__ALikelihood = {"_p_limix__ALikelihood", "limix::ALikelihood *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__AMultiCF = {"_p_limix__AMultiCF", "limix::AMultiCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__ARDataFrameT_MatrixXd_t = {"_p_limix__ARDataFrameT_MatrixXd_t", "limix::ARDataFrame< MatrixXd > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__AVarianceTerm = {"_p_limix__AVarianceTerm", "limix::AVarianceTerm *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__AWDataFrameT_MatrixXd_t = {"_p_limix__AWDataFrameT_MatrixXd_t", "limix::AWDataFrame< MatrixXd > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CCovLinearARD = {"_p_limix__CCovLinearARD", "limix::CCovLinearARD *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CCovLinearISO = {"_p_limix__CCovLinearISO", "limix::CCovLinearISO *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CCovLinearISODelta = {"_p_limix__CCovLinearISODelta", "limix::CCovLinearISODelta *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CCovSqexpARD = {"_p_limix__CCovSqexpARD", "limix::CCovSqexpARD *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CCovarianceFunctionCacheOld = {"_p_limix__CCovarianceFunctionCacheOld", "limix::CCovarianceFunctionCacheOld *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CData = {"_p_limix__CData", "limix::CData *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CDiagonalCF = {"_p_limix__CDiagonalCF", "limix::CDiagonalCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CFixedCF = {"_p_limix__CFixedCF", "limix::CFixedCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CFixedDiagonalCF = {"_p_limix__CFixedDiagonalCF", "limix::CFixedDiagonalCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CFreeFormCF = {"_p_limix__CFreeFormCF", "limix::CFreeFormCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPCholCache = {"_p_limix__CGPCholCache", "limix::CGPCholCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPHyperParams = {"_p_limix__CGPHyperParams", "limix::CGPHyperParams *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPKroneckerCache = {"_p_limix__CGPKroneckerCache", "limix::CGPKroneckerCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPSum = {"_p_limix__CGPSum", "limix::CGPSum *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPSumCache = {"_p_limix__CGPSumCache", "limix::CGPSumCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPbase = {"_p_limix__CGPbase", "limix::CGPbase *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPkronSum = {"_p_limix__CGPkronSum", "limix::CGPkronSum *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPkronSumCache = {"_p_limix__CGPkronSumCache", "limix::CGPkronSumCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPkronecker = {"_p_limix__CGPkronecker", "limix::CGPkronecker *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGPopt = {"_p_limix__CGPopt", "limix::CGPopt *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CGenotypeBlock = {"_p_limix__CGenotypeBlock", "limix::CGenotypeBlock *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CHeaderMap = {"_p_limix__CHeaderMap", "limix::CHeaderMap *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CInteractLMM = {"_p_limix__CInteractLMM", "limix::CInteractLMM *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CKroneckerCF = {"_p_limix__CKroneckerCF", "limix::CKroneckerCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CKroneckerLMM = {"_p_limix__CKroneckerLMM", "limix::CKroneckerLMM *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CKroneckerMean = {"_p_limix__CKroneckerMean", "limix::CKroneckerMean *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLMM = {"_p_limix__CLMM", "limix::CLMM *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLMMCore = {"_p_limix__CLMMCore", "limix::CLMMCore *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLMMKroneckerCore = {"_p_limix__CLMMKroneckerCore", "limix::CLMMKroneckerCore *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLikNormalIso = {"_p_limix__CLikNormalIso", "limix::CLikNormalIso *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLikNormalNULL = {"_p_limix__CLikNormalNULL", "limix::CLikNormalNULL *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLikNormalSVD = {"_p_limix__CLikNormalSVD", "limix::CLikNormalSVD *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLimixException = {"_p_limix__CLimixException", "limix::CLimixException *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLinCombCF = {"_p_limix__CLinCombCF", "limix::CLinCombCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLinearMean = {"_p_limix__CLinearMean", "limix::CLinearMean *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CLowRankCF = {"_p_limix__CLowRankCF", "limix::CLowRankCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CMemGenotypeContainer = {"_p_limix__CMemGenotypeContainer", "limix::CMemGenotypeContainer *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CMultiTraitTerm = {"_p_limix__CMultiTraitTerm", "limix::CMultiTraitTerm *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CNamedCache = {"_p_limix__CNamedCache", "limix::CNamedCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CParamObject = {"_p_limix__CParamObject", "limix::CParamObject *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CPolyCF = {"_p_limix__CPolyCF", "limix::CPolyCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CProductCF = {"_p_limix__CProductCF", "limix::CProductCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CRMemDataFrameT_MatrixXd_t = {"_p_limix__CRMemDataFrameT_MatrixXd_t", "limix::CRMemDataFrame< MatrixXd > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CRWMemDataFrameT_MatrixXd_t = {"_p_limix__CRWMemDataFrameT_MatrixXd_t", "limix::CRWMemDataFrame< MatrixXd > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CRank1diagCF = {"_p_limix__CRank1diagCF", "limix::CRank1diagCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CRankOneCF = {"_p_limix__CRankOneCF", "limix::CRankOneCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CSingleTraitTerm = {"_p_limix__CSingleTraitTerm", "limix::CSingleTraitTerm *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CSqExpCF = {"_p_limix__CSqExpCF", "limix::CSqExpCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CSumCF = {"_p_limix__CSumCF", "limix::CSumCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CSumLinear = {"_p_limix__CSumLinear", "limix::CSumLinear *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CTextfileGenotypeContainer = {"_p_limix__CTextfileGenotypeContainer", "limix::CTextfileGenotypeContainer *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__CVarianceDecomposition = {"_p_limix__CVarianceDecomposition", "limix::CVarianceDecomposition *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t = {"_p_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t", "limix::FlexEigenMatrix< Eigen::Dynamic,1,Eigen::ColMajor > *|limix::CFlexVector *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t = {"_p_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t", "limix::CFlexMatrix *|limix::FlexEigenMatrix< Eigen::Dynamic,Eigen::Dynamic,Eigen::ColMajor > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__nLLevalFunctor = {"_p_limix__nLLevalFunctor", "limix::nLLevalFunctor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_limix__nLLevalKronFunctor = {"_p_limix__nLLevalKronFunctor", "limix::nLLevalKronFunctor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|limix::mint_t *|long long *|intmax_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_mapped_type = {"_p_mapped_type", "mapped_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 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__allocatorT_MatrixXd_t = {"_p_std__allocatorT_MatrixXd_t", "std::vector< MatrixXd >::allocator_type *|std::allocator< MatrixXd > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_VectorXi_t = {"_p_std__allocatorT_VectorXi_t", "std::vector< VectorXi >::allocator_type *|std::allocator< VectorXi > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t = {"_p_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t", "std::map< std::string,MatrixXd >::allocator_type *|std::allocator< std::pair< std::string const,MatrixXd > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_std__string_t = {"_p_std__allocatorT_std__string_t", "std::vector< std::string >::allocator_type *|std::allocator< std::string > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__lessT_std__string_t = {"_p_std__lessT_std__string_t", "std::less< std::string > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t = {"_p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t", "std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > > *|std::map< std::string,MatrixXd > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__mapT_std__string_PCVoid_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_PCVoid_t_t_t = {"_p_std__mapT_std__string_PCVoid_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_PCVoid_t_t_t", "std::map< std::string,PCVoid,std::less< std::string >,std::allocator< std::pair< std::string const,PCVoid > > > *|limix::PCVoidContainer *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_MatrixXd_t = {"_p_std__shared_ptrT_MatrixXd_t", "std::shared_ptr< MatrixXd > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_bool_t = {"_p_std__shared_ptrT_bool_t", "limix::Pbool *|std::shared_ptr< bool > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_bost__enable_shared_from_thisT_CGPbase_t_t = {"_p_std__shared_ptrT_bost__enable_shared_from_thisT_CGPbase_t_t", "std::shared_ptr< bost::enable_shared_from_this< CGPbase > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__ACovarianceFunction_t = {"_p_std__shared_ptrT_limix__ACovarianceFunction_t", "limix::PCovarianceFunction *|std::shared_ptr< limix::ACovarianceFunction > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__ADataTerm_t = {"_p_std__shared_ptrT_limix__ADataTerm_t", "std::shared_ptr< limix::ADataTerm > *|limix::PDataTerm *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__AGenotypeContainer_t = {"_p_std__shared_ptrT_limix__AGenotypeContainer_t", "std::shared_ptr< limix::AGenotypeContainer > *|limix::PGenotypeContainer *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__ALMM_t = {"_p_std__shared_ptrT_limix__ALMM_t", "std::shared_ptr< limix::ALMM > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__ALikelihood_t = {"_p_std__shared_ptrT_limix__ALikelihood_t", "std::shared_ptr< limix::ALikelihood > *|limix::PLikelihood *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__AMultiCF_t = {"_p_std__shared_ptrT_limix__AMultiCF_t", "std::shared_ptr< limix::AMultiCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t = {"_p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t", "std::shared_ptr< limix::ARDataFrame< MatrixXd > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__AVarianceTerm_t = {"_p_std__shared_ptrT_limix__AVarianceTerm_t", "std::shared_ptr< limix::AVarianceTerm > *|limix::PVarianceTerm *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CCovLinearARD_t = {"_p_std__shared_ptrT_limix__CCovLinearARD_t", "std::shared_ptr< limix::CCovLinearARD > *|limix::PCovLinearARD *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CCovLinearISODelta_t = {"_p_std__shared_ptrT_limix__CCovLinearISODelta_t", "std::shared_ptr< limix::CCovLinearISODelta > *|limix::PCovLinearISODelta *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CCovLinearISO_t = {"_p_std__shared_ptrT_limix__CCovLinearISO_t", "std::shared_ptr< limix::CCovLinearISO > *|limix::PCovLinearISO *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CCovSqexpARD_t = {"_p_std__shared_ptrT_limix__CCovSqexpARD_t", "limix::PCovSqexpARD *|std::shared_ptr< limix::CCovSqexpARD > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t = {"_p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t", "limix::PCovarianceFunctionCacheOld *|std::shared_ptr< limix::CCovarianceFunctionCacheOld > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CCovarianceFunctionCache_t = {"_p_std__shared_ptrT_limix__CCovarianceFunctionCache_t", "std::shared_ptr< limix::CCovarianceFunctionCache > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CData_t = {"_p_std__shared_ptrT_limix__CData_t", "std::shared_ptr< limix::CData > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CDiagonalCF_t = {"_p_std__shared_ptrT_limix__CDiagonalCF_t", "limix::PDiagonalCF *|std::shared_ptr< limix::CDiagonalCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CFixedCF_t = {"_p_std__shared_ptrT_limix__CFixedCF_t", "std::shared_ptr< limix::CFixedCF > *|limix::PFixedCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CFixedDiagonalCF_t = {"_p_std__shared_ptrT_limix__CFixedDiagonalCF_t", "limix::PFixedDiagonalCF *|std::shared_ptr< limix::CFixedDiagonalCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CFreeFormCF_t = {"_p_std__shared_ptrT_limix__CFreeFormCF_t", "limix::PFreeFormCF *|std::shared_ptr< limix::CFreeFormCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPCholCache_t = {"_p_std__shared_ptrT_limix__CGPCholCache_t", "std::shared_ptr< limix::CGPCholCache > *|limix::PGPCholCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPHyperParams_t = {"_p_std__shared_ptrT_limix__CGPHyperParams_t", "std::shared_ptr< limix::CGPHyperParams > *|limix::PGPHyperParams *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPKroneckerCache_t = {"_p_std__shared_ptrT_limix__CGPKroneckerCache_t", "std::shared_ptr< limix::CGPKroneckerCache > *|limix::PGPKroneckerCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPLMM_t = {"_p_std__shared_ptrT_limix__CGPLMM_t", "std::shared_ptr< limix::CGPLMM > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPSumCache_t = {"_p_std__shared_ptrT_limix__CGPSumCache_t", "std::shared_ptr< limix::CGPSumCache > *|limix::PGPSumCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPSum_t = {"_p_std__shared_ptrT_limix__CGPSum_t", "limix::PGPSum *|std::shared_ptr< limix::CGPSum > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPbase_t = {"_p_std__shared_ptrT_limix__CGPbase_t", "std::shared_ptr< limix::CGPbase > *|limix::PGPbase *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPkronSumCache_t = {"_p_std__shared_ptrT_limix__CGPkronSumCache_t", "std::shared_ptr< limix::CGPkronSumCache > *|limix::PGPkronSumCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPkronSum_t = {"_p_std__shared_ptrT_limix__CGPkronSum_t", "limix::PGPkronSum *|std::shared_ptr< limix::CGPkronSum > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPkronecker_t = {"_p_std__shared_ptrT_limix__CGPkronecker_t", "std::shared_ptr< limix::CGPkronecker > *|limix::PGPkronecker *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPopt_t = {"_p_std__shared_ptrT_limix__CGPopt_t", "std::shared_ptr< limix::CGPopt > *|limix::PGPopt *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGPvarDecomp_t = {"_p_std__shared_ptrT_limix__CGPvarDecomp_t", "std::shared_ptr< limix::CGPvarDecomp > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CGenotypeBlock_t = {"_p_std__shared_ptrT_limix__CGenotypeBlock_t", "limix::PGenotypeBlock *|std::shared_ptr< limix::CGenotypeBlock > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CHeaderMap_t = {"_p_std__shared_ptrT_limix__CHeaderMap_t", "limix::PHeaderMap *|std::shared_ptr< limix::CHeaderMap > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CInteractLMM_t = {"_p_std__shared_ptrT_limix__CInteractLMM_t", "std::shared_ptr< limix::CInteractLMM > *|limix::PInteractLMM *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CKroneckerCF_t = {"_p_std__shared_ptrT_limix__CKroneckerCF_t", "std::shared_ptr< limix::CKroneckerCF > *|limix::PKroneckerCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CKroneckerLMM_t = {"_p_std__shared_ptrT_limix__CKroneckerLMM_t", "std::shared_ptr< limix::CKroneckerLMM > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CKroneckerMean_t = {"_p_std__shared_ptrT_limix__CKroneckerMean_t", "limix::PKroneckerMean *|std::shared_ptr< limix::CKroneckerMean > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLMMCore_t = {"_p_std__shared_ptrT_limix__CLMMCore_t", "std::shared_ptr< limix::CLMMCore > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLMMKroneckerCore_t = {"_p_std__shared_ptrT_limix__CLMMKroneckerCore_t", "std::shared_ptr< limix::CLMMKroneckerCore > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLMM_t = {"_p_std__shared_ptrT_limix__CLMM_t", "std::shared_ptr< limix::CLMM > *|limix::PLMM *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLikNormalIso_t = {"_p_std__shared_ptrT_limix__CLikNormalIso_t", "std::shared_ptr< limix::CLikNormalIso > *|limix::PLikNormalIso *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLikNormalNULL_t = {"_p_std__shared_ptrT_limix__CLikNormalNULL_t", "limix::PLikNormalNULL *|std::shared_ptr< limix::CLikNormalNULL > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLikNormalSVD_t = {"_p_std__shared_ptrT_limix__CLikNormalSVD_t", "std::shared_ptr< limix::CLikNormalSVD > *|limix::PLikNormalSVD *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLinCombCF_t = {"_p_std__shared_ptrT_limix__CLinCombCF_t", "std::shared_ptr< limix::CLinCombCF > *|limix::PLinCombCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLinearMean_t = {"_p_std__shared_ptrT_limix__CLinearMean_t", "limix::PLinearMean *|std::shared_ptr< limix::CLinearMean > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CLowRankCF_t = {"_p_std__shared_ptrT_limix__CLowRankCF_t", "limix::PLowRankCF *|std::shared_ptr< limix::CLowRankCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CMemGenotypeContainer_t = {"_p_std__shared_ptrT_limix__CMemGenotypeContainer_t", "std::shared_ptr< limix::CMemGenotypeContainer > *|limix::PMemGenotypeContainer *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CMultiTraitTerm_t = {"_p_std__shared_ptrT_limix__CMultiTraitTerm_t", "std::shared_ptr< limix::CMultiTraitTerm > *|limix::PMultiTraitTerm *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CMultiTraitVQTL_t = {"_p_std__shared_ptrT_limix__CMultiTraitVQTL_t", "std::shared_ptr< limix::CMultiTraitVQTL > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CNamedCache_t = {"_p_std__shared_ptrT_limix__CNamedCache_t", "std::shared_ptr< limix::CNamedCache > *|limix::PNamedCache *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CParamObject_t = {"_p_std__shared_ptrT_limix__CParamObject_t", "std::shared_ptr< limix::CParamObject > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CPolyCF_t = {"_p_std__shared_ptrT_limix__CPolyCF_t", "limix::PPolyCF *|std::shared_ptr< limix::CPolyCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CProductCF_t = {"_p_std__shared_ptrT_limix__CProductCF_t", "limix::PProductCF *|std::shared_ptr< limix::CProductCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t = {"_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t", "std::shared_ptr< limix::CRMemDataFrame< MatrixXd > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t = {"_p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t", "std::shared_ptr< limix::CRWMemDataFrame< MatrixXd > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CRank1diagCF_t = {"_p_std__shared_ptrT_limix__CRank1diagCF_t", "limix::PRank1diagCF *|std::shared_ptr< limix::CRank1diagCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CRankOneCF_t = {"_p_std__shared_ptrT_limix__CRankOneCF_t", "std::shared_ptr< limix::CRankOneCF > *|limix::PRankOneCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CSingleTraitTerm_t = {"_p_std__shared_ptrT_limix__CSingleTraitTerm_t", "std::shared_ptr< limix::CSingleTraitTerm > *|limix::PSingleTraitTerm *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CSqExpCF_t = {"_p_std__shared_ptrT_limix__CSqExpCF_t", "std::shared_ptr< limix::CSqExpCF > *|limix::PSqExpCF *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CSumCF_t = {"_p_std__shared_ptrT_limix__CSumCF_t", "limix::PSumCF *|std::shared_ptr< limix::CSumCF > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CSumLinear_t = {"_p_std__shared_ptrT_limix__CSumLinear_t", "std::shared_ptr< limix::CSumLinear > *|limix::PSumLinear *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t = {"_p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t", "std::shared_ptr< limix::CTextfileGenotypeContainer > *|limix::PTextfileGenotypeContainer *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CVarianceDecomposition_t = {"_p_std__shared_ptrT_limix__CVarianceDecomposition_t", "limix::PVarianceDecomposition *|std::shared_ptr< limix::CVarianceDecomposition > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__CVqtl_t = {"_p_std__shared_ptrT_limix__CVqtl_t", "std::shared_ptr< limix::CVqtl > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t_t = {"_p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t_t", "std::shared_ptr< limix::FlexEigenMatrix< Eigen::Dynamic,1,Eigen::ColMajor > > *|limix::PFlexVector *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t_t = {"_p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t_t", "std::shared_ptr< limix::FlexEigenMatrix< Eigen::Dynamic,Eigen::Dynamic,Eigen::ColMajor > > *|limix::PFlexMatrix *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_limix__stringVec_t = {"_p_std__shared_ptrT_limix__stringVec_t", "limix::PstringVec *|std::shared_ptr< limix::stringVec > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t = {"_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t", "std::shared_ptr< std::map< std::string,MatrixXd,std::less< std::string >,std::allocator< std::pair< std::string const,MatrixXd > > > > *|std::shared_ptr< std::map< std::string,MatrixXd > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t = {"_p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t", "std::vector< MatrixXd,std::allocator< MatrixXd > > *|limix::MatrixXdVec *|std::vector< MatrixXd > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t = {"_p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t", "std::vector< VectorXi,std::allocator< VectorXi > > *|std::vector< VectorXi > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t = {"_p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t", "std::vector< limix::CGPHyperParams,std::allocator< limix::CGPHyperParams > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_bool_t_std__allocatorT_std__shared_ptrT_bool_t_t_t = {"_p_std__vectorT_std__shared_ptrT_bool_t_std__allocatorT_std__shared_ptrT_bool_t_t_t", "std::vector< std::shared_ptr< bool >,std::allocator< std::shared_ptr< bool > > > *|limix::PboolVec *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t = {"_p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t", "limix::ACovarVec *|std::vector< std::shared_ptr< limix::ACovarianceFunction >,std::allocator< std::shared_ptr< limix::ACovarianceFunction > > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_limix__AVarianceTerm_t_std__allocatorT_std__shared_ptrT_limix__AVarianceTerm_t_t_t = {"_p_std__vectorT_std__shared_ptrT_limix__AVarianceTerm_t_std__allocatorT_std__shared_ptrT_limix__AVarianceTerm_t_t_t", "limix::PVarianceTermVec *|std::vector< std::shared_ptr< limix::AVarianceTerm >,std::allocator< std::shared_ptr< limix::AVarianceTerm > > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_limix__CLinearMean_t_std__allocatorT_std__shared_ptrT_limix__CLinearMean_t_t_t = {"_p_std__vectorT_std__shared_ptrT_limix__CLinearMean_t_std__allocatorT_std__shared_ptrT_limix__CLinearMean_t_t_t", "limix::VecLinearMean *|std::vector< std::shared_ptr< limix::CLinearMean >,std::allocator< std::shared_ptr< limix::CLinearMean > > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t = {"_p_std__vectorT_std__string_std__allocatorT_std__string_t_t", "limix::stringVec *|std::vector< std::string,std::allocator< std::string > > *|std::vector< std::string > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint_least64_t *|uint_fast64_t *|uint64_t *|limix::muint_t *|unsigned long long *|uintmax_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 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_MatrixXb,
  &_swigt__p_MatrixXd,
  &_swigt__p_MatrixXdChol,
  &_swigt__p_MatrixXi,
  &_swigt__p_PCVoid,
  &_swigt__p_PMatrixXd,
  &_swigt__p_PVectorXi,
  &_swigt__p_VectorXd,
  &_swigt__p_VectorXi,
  &_swigt__p_allocator_type,
  &_swigt__p_char,
  &_swigt__p_difference_type,
  &_swigt__p_double,
  &_swigt__p_float,
  &_swigt__p_int,
  &_swigt__p_key_type,
  &_swigt__p_limix__ACovarianceFunction,
  &_swigt__p_limix__ADataTerm,
  &_swigt__p_limix__AGenotypeContainer,
  &_swigt__p_limix__ALMM,
  &_swigt__p_limix__ALikelihood,
  &_swigt__p_limix__AMultiCF,
  &_swigt__p_limix__ARDataFrameT_MatrixXd_t,
  &_swigt__p_limix__AVarianceTerm,
  &_swigt__p_limix__AWDataFrameT_MatrixXd_t,
  &_swigt__p_limix__CCovLinearARD,
  &_swigt__p_limix__CCovLinearISO,
  &_swigt__p_limix__CCovLinearISODelta,
  &_swigt__p_limix__CCovSqexpARD,
  &_swigt__p_limix__CCovarianceFunctionCacheOld,
  &_swigt__p_limix__CData,
  &_swigt__p_limix__CDiagonalCF,
  &_swigt__p_limix__CFixedCF,
  &_swigt__p_limix__CFixedDiagonalCF,
  &_swigt__p_limix__CFreeFormCF,
  &_swigt__p_limix__CGPCholCache,
  &_swigt__p_limix__CGPHyperParams,
  &_swigt__p_limix__CGPKroneckerCache,
  &_swigt__p_limix__CGPSum,
  &_swigt__p_limix__CGPSumCache,
  &_swigt__p_limix__CGPbase,
  &_swigt__p_limix__CGPkronSum,
  &_swigt__p_limix__CGPkronSumCache,
  &_swigt__p_limix__CGPkronecker,
  &_swigt__p_limix__CGPopt,
  &_swigt__p_limix__CGenotypeBlock,
  &_swigt__p_limix__CHeaderMap,
  &_swigt__p_limix__CInteractLMM,
  &_swigt__p_limix__CKroneckerCF,
  &_swigt__p_limix__CKroneckerLMM,
  &_swigt__p_limix__CKroneckerMean,
  &_swigt__p_limix__CLMM,
  &_swigt__p_limix__CLMMCore,
  &_swigt__p_limix__CLMMKroneckerCore,
  &_swigt__p_limix__CLikNormalIso,
  &_swigt__p_limix__CLikNormalNULL,
  &_swigt__p_limix__CLikNormalSVD,
  &_swigt__p_limix__CLimixException,
  &_swigt__p_limix__CLinCombCF,
  &_swigt__p_limix__CLinearMean,
  &_swigt__p_limix__CLowRankCF,
  &_swigt__p_limix__CMemGenotypeContainer,
  &_swigt__p_limix__CMultiTraitTerm,
  &_swigt__p_limix__CNamedCache,
  &_swigt__p_limix__CParamObject,
  &_swigt__p_limix__CPolyCF,
  &_swigt__p_limix__CProductCF,
  &_swigt__p_limix__CRMemDataFrameT_MatrixXd_t,
  &_swigt__p_limix__CRWMemDataFrameT_MatrixXd_t,
  &_swigt__p_limix__CRank1diagCF,
  &_swigt__p_limix__CRankOneCF,
  &_swigt__p_limix__CSingleTraitTerm,
  &_swigt__p_limix__CSqExpCF,
  &_swigt__p_limix__CSumCF,
  &_swigt__p_limix__CSumLinear,
  &_swigt__p_limix__CTextfileGenotypeContainer,
  &_swigt__p_limix__CVarianceDecomposition,
  &_swigt__p_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t,
  &_swigt__p_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t,
  &_swigt__p_limix__nLLevalFunctor,
  &_swigt__p_limix__nLLevalKronFunctor,
  &_swigt__p_long_long,
  &_swigt__p_mapped_type,
  &_swigt__p_p_PyObject,
  &_swigt__p_short,
  &_swigt__p_signed_char,
  &_swigt__p_size_type,
  &_swigt__p_std__allocatorT_MatrixXd_t,
  &_swigt__p_std__allocatorT_VectorXi_t,
  &_swigt__p_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t,
  &_swigt__p_std__allocatorT_std__string_t,
  &_swigt__p_std__exception,
  &_swigt__p_std__invalid_argument,
  &_swigt__p_std__lessT_std__string_t,
  &_swigt__p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t,
  &_swigt__p_std__mapT_std__string_PCVoid_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_PCVoid_t_t_t,
  &_swigt__p_std__shared_ptrT_MatrixXd_t,
  &_swigt__p_std__shared_ptrT_bool_t,
  &_swigt__p_std__shared_ptrT_bost__enable_shared_from_thisT_CGPbase_t_t,
  &_swigt__p_std__shared_ptrT_limix__ACovarianceFunction_t,
  &_swigt__p_std__shared_ptrT_limix__ADataTerm_t,
  &_swigt__p_std__shared_ptrT_limix__AGenotypeContainer_t,
  &_swigt__p_std__shared_ptrT_limix__ALMM_t,
  &_swigt__p_std__shared_ptrT_limix__ALikelihood_t,
  &_swigt__p_std__shared_ptrT_limix__AMultiCF_t,
  &_swigt__p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t,
  &_swigt__p_std__shared_ptrT_limix__AVarianceTerm_t,
  &_swigt__p_std__shared_ptrT_limix__CCovLinearARD_t,
  &_swigt__p_std__shared_ptrT_limix__CCovLinearISODelta_t,
  &_swigt__p_std__shared_ptrT_limix__CCovLinearISO_t,
  &_swigt__p_std__shared_ptrT_limix__CCovSqexpARD_t,
  &_swigt__p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,
  &_swigt__p_std__shared_ptrT_limix__CCovarianceFunctionCache_t,
  &_swigt__p_std__shared_ptrT_limix__CData_t,
  &_swigt__p_std__shared_ptrT_limix__CDiagonalCF_t,
  &_swigt__p_std__shared_ptrT_limix__CFixedCF_t,
  &_swigt__p_std__shared_ptrT_limix__CFixedDiagonalCF_t,
  &_swigt__p_std__shared_ptrT_limix__CFreeFormCF_t,
  &_swigt__p_std__shared_ptrT_limix__CGPCholCache_t,
  &_swigt__p_std__shared_ptrT_limix__CGPHyperParams_t,
  &_swigt__p_std__shared_ptrT_limix__CGPKroneckerCache_t,
  &_swigt__p_std__shared_ptrT_limix__CGPLMM_t,
  &_swigt__p_std__shared_ptrT_limix__CGPSumCache_t,
  &_swigt__p_std__shared_ptrT_limix__CGPSum_t,
  &_swigt__p_std__shared_ptrT_limix__CGPbase_t,
  &_swigt__p_std__shared_ptrT_limix__CGPkronSumCache_t,
  &_swigt__p_std__shared_ptrT_limix__CGPkronSum_t,
  &_swigt__p_std__shared_ptrT_limix__CGPkronecker_t,
  &_swigt__p_std__shared_ptrT_limix__CGPopt_t,
  &_swigt__p_std__shared_ptrT_limix__CGPvarDecomp_t,
  &_swigt__p_std__shared_ptrT_limix__CGenotypeBlock_t,
  &_swigt__p_std__shared_ptrT_limix__CHeaderMap_t,
  &_swigt__p_std__shared_ptrT_limix__CInteractLMM_t,
  &_swigt__p_std__shared_ptrT_limix__CKroneckerCF_t,
  &_swigt__p_std__shared_ptrT_limix__CKroneckerLMM_t,
  &_swigt__p_std__shared_ptrT_limix__CKroneckerMean_t,
  &_swigt__p_std__shared_ptrT_limix__CLMMCore_t,
  &_swigt__p_std__shared_ptrT_limix__CLMMKroneckerCore_t,
  &_swigt__p_std__shared_ptrT_limix__CLMM_t,
  &_swigt__p_std__shared_ptrT_limix__CLikNormalIso_t,
  &_swigt__p_std__shared_ptrT_limix__CLikNormalNULL_t,
  &_swigt__p_std__shared_ptrT_limix__CLikNormalSVD_t,
  &_swigt__p_std__shared_ptrT_limix__CLinCombCF_t,
  &_swigt__p_std__shared_ptrT_limix__CLinearMean_t,
  &_swigt__p_std__shared_ptrT_limix__CLowRankCF_t,
  &_swigt__p_std__shared_ptrT_limix__CMemGenotypeContainer_t,
  &_swigt__p_std__shared_ptrT_limix__CMultiTraitTerm_t,
  &_swigt__p_std__shared_ptrT_limix__CMultiTraitVQTL_t,
  &_swigt__p_std__shared_ptrT_limix__CNamedCache_t,
  &_swigt__p_std__shared_ptrT_limix__CParamObject_t,
  &_swigt__p_std__shared_ptrT_limix__CPolyCF_t,
  &_swigt__p_std__shared_ptrT_limix__CProductCF_t,
  &_swigt__p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t,
  &_swigt__p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t,
  &_swigt__p_std__shared_ptrT_limix__CRank1diagCF_t,
  &_swigt__p_std__shared_ptrT_limix__CRankOneCF_t,
  &_swigt__p_std__shared_ptrT_limix__CSingleTraitTerm_t,
  &_swigt__p_std__shared_ptrT_limix__CSqExpCF_t,
  &_swigt__p_std__shared_ptrT_limix__CSumCF_t,
  &_swigt__p_std__shared_ptrT_limix__CSumLinear_t,
  &_swigt__p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t,
  &_swigt__p_std__shared_ptrT_limix__CVarianceDecomposition_t,
  &_swigt__p_std__shared_ptrT_limix__CVqtl_t,
  &_swigt__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t_t,
  &_swigt__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t_t,
  &_swigt__p_std__shared_ptrT_limix__stringVec_t,
  &_swigt__p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t,
  &_swigt__p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t,
  &_swigt__p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t,
  &_swigt__p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t,
  &_swigt__p_std__vectorT_std__shared_ptrT_bool_t_std__allocatorT_std__shared_ptrT_bool_t_t_t,
  &_swigt__p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t,
  &_swigt__p_std__vectorT_std__shared_ptrT_limix__AVarianceTerm_t_std__allocatorT_std__shared_ptrT_limix__AVarianceTerm_t_t_t,
  &_swigt__p_std__vectorT_std__shared_ptrT_limix__CLinearMean_t_std__allocatorT_std__shared_ptrT_limix__CLinearMean_t_t_t,
  &_swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t,
  &_swigt__p_swig__SwigPyIterator,
  &_swigt__p_unsigned_char,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long_long,
  &_swigt__p_unsigned_short,
  &_swigt__p_value_type,
};

static swig_cast_info _swigc__p_MatrixXb[] = {  {&_swigt__p_MatrixXb, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MatrixXd[] = {  {&_swigt__p_MatrixXd, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MatrixXdChol[] = {  {&_swigt__p_MatrixXdChol, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MatrixXi[] = {  {&_swigt__p_MatrixXi, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PCVoid[] = {  {&_swigt__p_PCVoid, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PMatrixXd[] = {  {&_swigt__p_PMatrixXd, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PVectorXi[] = {  {&_swigt__p_PVectorXi, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VectorXd[] = {  {&_swigt__p_VectorXd, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VectorXi[] = {  {&_swigt__p_VectorXi, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_allocator_type[] = {  {&_swigt__p_allocator_type, 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_difference_type[] = {  {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 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_key_type[] = {  {&_swigt__p_key_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__ACovarianceFunction[] = {  {&_swigt__p_limix__CFixedCF, _p_limix__CFixedCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CPolyCF, _p_limix__CPolyCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CCovLinearISO, _p_limix__CCovLinearISOTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CSqExpCF, _p_limix__CSqExpCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CSumCF, _p_limix__CSumCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CRank1diagCF, _p_limix__CRank1diagCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CLikNormalSVD, _p_limix__CLikNormalSVDTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CFreeFormCF, _p_limix__CFreeFormCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__ALikelihood, _p_limix__ALikelihoodTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CFixedDiagonalCF, _p_limix__CFixedDiagonalCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CDiagonalCF, _p_limix__CDiagonalCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__ACovarianceFunction, 0, 0, 0},  {&_swigt__p_limix__CCovLinearISODelta, _p_limix__CCovLinearISODeltaTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__AMultiCF, _p_limix__AMultiCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CCovSqexpARD, _p_limix__CCovSqexpARDTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CProductCF, _p_limix__CProductCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CLikNormalNULL, _p_limix__CLikNormalNULLTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CKroneckerCF, _p_limix__CKroneckerCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CCovLinearARD, _p_limix__CCovLinearARDTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CRankOneCF, _p_limix__CRankOneCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CLinCombCF, _p_limix__CLinCombCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CLowRankCF, _p_limix__CLowRankCFTo_p_limix__ACovarianceFunction, 0, 0},  {&_swigt__p_limix__CLikNormalIso, _p_limix__CLikNormalIsoTo_p_limix__ACovarianceFunction, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__ADataTerm[] = {  {&_swigt__p_limix__CLinearMean, _p_limix__CLinearMeanTo_p_limix__ADataTerm, 0, 0},  {&_swigt__p_limix__CKroneckerMean, _p_limix__CKroneckerMeanTo_p_limix__ADataTerm, 0, 0},  {&_swigt__p_limix__CData, _p_limix__CDataTo_p_limix__ADataTerm, 0, 0},  {&_swigt__p_limix__ADataTerm, 0, 0, 0},  {&_swigt__p_limix__CSumLinear, _p_limix__CSumLinearTo_p_limix__ADataTerm, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__AGenotypeContainer[] = {  {&_swigt__p_limix__AGenotypeContainer, 0, 0, 0},  {&_swigt__p_limix__CTextfileGenotypeContainer, _p_limix__CTextfileGenotypeContainerTo_p_limix__AGenotypeContainer, 0, 0},  {&_swigt__p_limix__CMemGenotypeContainer, _p_limix__CMemGenotypeContainerTo_p_limix__AGenotypeContainer, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__ALMM[] = {  {&_swigt__p_limix__ALMM, 0, 0, 0},  {&_swigt__p_limix__CInteractLMM, _p_limix__CInteractLMMTo_p_limix__ALMM, 0, 0},  {&_swigt__p_limix__CLMM, _p_limix__CLMMTo_p_limix__ALMM, 0, 0},  {&_swigt__p_limix__CKroneckerLMM, _p_limix__CKroneckerLMMTo_p_limix__ALMM, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__ALikelihood[] = {  {&_swigt__p_limix__CLikNormalIso, _p_limix__CLikNormalIsoTo_p_limix__ALikelihood, 0, 0},  {&_swigt__p_limix__CLikNormalSVD, _p_limix__CLikNormalSVDTo_p_limix__ALikelihood, 0, 0},  {&_swigt__p_limix__ALikelihood, 0, 0, 0},  {&_swigt__p_limix__CLikNormalNULL, _p_limix__CLikNormalNULLTo_p_limix__ALikelihood, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__AMultiCF[] = {  {&_swigt__p_limix__CLinCombCF, _p_limix__CLinCombCFTo_p_limix__AMultiCF, 0, 0},  {&_swigt__p_limix__CKroneckerCF, _p_limix__CKroneckerCFTo_p_limix__AMultiCF, 0, 0},  {&_swigt__p_limix__AMultiCF, 0, 0, 0},  {&_swigt__p_limix__CSumCF, _p_limix__CSumCFTo_p_limix__AMultiCF, 0, 0},  {&_swigt__p_limix__CProductCF, _p_limix__CProductCFTo_p_limix__AMultiCF, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__ARDataFrameT_MatrixXd_t[] = {  {&_swigt__p_limix__ARDataFrameT_MatrixXd_t, 0, 0, 0},  {&_swigt__p_limix__CGenotypeBlock, _p_limix__CGenotypeBlockTo_p_limix__ARDataFrameT_MatrixXd_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__AVarianceTerm[] = {  {&_swigt__p_limix__AVarianceTerm, 0, 0, 0},  {&_swigt__p_limix__CSingleTraitTerm, _p_limix__CSingleTraitTermTo_p_limix__AVarianceTerm, 0, 0},  {&_swigt__p_limix__CMultiTraitTerm, _p_limix__CMultiTraitTermTo_p_limix__AVarianceTerm, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__AWDataFrameT_MatrixXd_t[] = {  {&_swigt__p_limix__AWDataFrameT_MatrixXd_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CCovLinearARD[] = {  {&_swigt__p_limix__CCovLinearARD, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CCovLinearISO[] = {  {&_swigt__p_limix__CCovLinearISO, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CCovLinearISODelta[] = {  {&_swigt__p_limix__CCovLinearISODelta, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CCovSqexpARD[] = {  {&_swigt__p_limix__CCovSqexpARD, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CCovarianceFunctionCacheOld[] = {  {&_swigt__p_limix__CCovarianceFunctionCacheOld, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CData[] = {  {&_swigt__p_limix__CData, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CDiagonalCF[] = {  {&_swigt__p_limix__CDiagonalCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CFixedCF[] = {  {&_swigt__p_limix__CFixedCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CFixedDiagonalCF[] = {  {&_swigt__p_limix__CFixedDiagonalCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CFreeFormCF[] = {  {&_swigt__p_limix__CFreeFormCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPCholCache[] = {  {&_swigt__p_limix__CGPCholCache, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPHyperParams[] = {  {&_swigt__p_limix__CGPHyperParams, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPKroneckerCache[] = {  {&_swigt__p_limix__CGPKroneckerCache, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPSum[] = {  {&_swigt__p_limix__CGPSum, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPSumCache[] = {  {&_swigt__p_limix__CGPSumCache, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPbase[] = {  {&_swigt__p_limix__CGPSum, _p_limix__CGPSumTo_p_limix__CGPbase, 0, 0},  {&_swigt__p_limix__CGPkronecker, _p_limix__CGPkroneckerTo_p_limix__CGPbase, 0, 0},  {&_swigt__p_limix__CGPkronSum, _p_limix__CGPkronSumTo_p_limix__CGPbase, 0, 0},  {&_swigt__p_limix__CGPbase, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPkronSum[] = {  {&_swigt__p_limix__CGPkronSum, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPkronSumCache[] = {  {&_swigt__p_limix__CGPkronSumCache, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPkronecker[] = {  {&_swigt__p_limix__CGPkronecker, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGPopt[] = {  {&_swigt__p_limix__CGPopt, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CGenotypeBlock[] = {  {&_swigt__p_limix__CGenotypeBlock, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CHeaderMap[] = {  {&_swigt__p_limix__CHeaderMap, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CInteractLMM[] = {  {&_swigt__p_limix__CInteractLMM, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CKroneckerCF[] = {  {&_swigt__p_limix__CKroneckerCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CKroneckerLMM[] = {  {&_swigt__p_limix__CKroneckerLMM, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CKroneckerMean[] = {  {&_swigt__p_limix__CKroneckerMean, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLMM[] = {  {&_swigt__p_limix__CInteractLMM, _p_limix__CInteractLMMTo_p_limix__CLMM, 0, 0},  {&_swigt__p_limix__CLMM, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLMMCore[] = {  {&_swigt__p_limix__CInteractLMM, _p_limix__CInteractLMMTo_p_limix__CLMMCore, 0, 0},  {&_swigt__p_limix__CLMM, _p_limix__CLMMTo_p_limix__CLMMCore, 0, 0},  {&_swigt__p_limix__CLMMKroneckerCore, _p_limix__CLMMKroneckerCoreTo_p_limix__CLMMCore, 0, 0},  {&_swigt__p_limix__CLMMCore, 0, 0, 0},  {&_swigt__p_limix__CKroneckerLMM, _p_limix__CKroneckerLMMTo_p_limix__CLMMCore, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLMMKroneckerCore[] = {  {&_swigt__p_limix__CLMMKroneckerCore, 0, 0, 0},  {&_swigt__p_limix__CKroneckerLMM, _p_limix__CKroneckerLMMTo_p_limix__CLMMKroneckerCore, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLikNormalIso[] = {  {&_swigt__p_limix__CLikNormalIso, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLikNormalNULL[] = {  {&_swigt__p_limix__CLikNormalNULL, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLikNormalSVD[] = {  {&_swigt__p_limix__CLikNormalSVD, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLimixException[] = {  {&_swigt__p_limix__CLimixException, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLinCombCF[] = {  {&_swigt__p_limix__CLinCombCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLinearMean[] = {  {&_swigt__p_limix__CLinearMean, 0, 0, 0},  {&_swigt__p_limix__CKroneckerMean, _p_limix__CKroneckerMeanTo_p_limix__CLinearMean, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CLowRankCF[] = {  {&_swigt__p_limix__CLowRankCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CMemGenotypeContainer[] = {  {&_swigt__p_limix__CMemGenotypeContainer, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CMultiTraitTerm[] = {  {&_swigt__p_limix__CMultiTraitTerm, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CNamedCache[] = {  {&_swigt__p_limix__CNamedCache, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CParamObject[] = {  {&_swigt__p_limix__CCovSqexpARD, _p_limix__CCovSqexpARDTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CSumLinear, _p_limix__CSumLinearTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CLowRankCF, _p_limix__CLowRankCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CCovLinearARD, _p_limix__CCovLinearARDTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CGPCholCache, _p_limix__CGPCholCacheTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CRankOneCF, _p_limix__CRankOneCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CSumCF, _p_limix__CSumCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CLinearMean, _p_limix__CLinearMeanTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CProductCF, _p_limix__CProductCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CLikNormalSVD, _p_limix__CLikNormalSVDTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__ADataTerm, _p_limix__ADataTermTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CFixedDiagonalCF, _p_limix__CFixedDiagonalCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CDiagonalCF, _p_limix__CDiagonalCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CGPKroneckerCache, _p_limix__CGPKroneckerCacheTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CKroneckerMean, _p_limix__CKroneckerMeanTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CFixedCF, _p_limix__CFixedCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CLinCombCF, _p_limix__CLinCombCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__ALikelihood, _p_limix__ALikelihoodTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CRank1diagCF, _p_limix__CRank1diagCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CLikNormalNULL, _p_limix__CLikNormalNULLTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__AMultiCF, _p_limix__AMultiCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CCovLinearISO, _p_limix__CCovLinearISOTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CGPSumCache, _p_limix__CGPSumCacheTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CGPkronSumCache, _p_limix__CGPkronSumCacheTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CCovarianceFunctionCacheOld, _p_limix__CCovarianceFunctionCacheOldTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CPolyCF, _p_limix__CPolyCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CParamObject, 0, 0, 0},  {&_swigt__p_limix__CKroneckerCF, _p_limix__CKroneckerCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CLikNormalIso, _p_limix__CLikNormalIsoTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CCovLinearISODelta, _p_limix__CCovLinearISODeltaTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CNamedCache, _p_limix__CNamedCacheTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CSqExpCF, _p_limix__CSqExpCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__ACovarianceFunction, _p_limix__ACovarianceFunctionTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CFreeFormCF, _p_limix__CFreeFormCFTo_p_limix__CParamObject, 0, 0},  {&_swigt__p_limix__CData, _p_limix__CDataTo_p_limix__CParamObject, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CPolyCF[] = {  {&_swigt__p_limix__CPolyCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CProductCF[] = {  {&_swigt__p_limix__CProductCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CRMemDataFrameT_MatrixXd_t[] = {  {&_swigt__p_limix__CRMemDataFrameT_MatrixXd_t, 0, 0, 0},  {&_swigt__p_limix__CGenotypeBlock, _p_limix__CGenotypeBlockTo_p_limix__CRMemDataFrameT_MatrixXd_t, 0, 0},  {&_swigt__p_limix__CRWMemDataFrameT_MatrixXd_t, _p_limix__CRWMemDataFrameT_MatrixXd_tTo_p_limix__CRMemDataFrameT_MatrixXd_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CRWMemDataFrameT_MatrixXd_t[] = {  {&_swigt__p_limix__CRWMemDataFrameT_MatrixXd_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CRank1diagCF[] = {  {&_swigt__p_limix__CRank1diagCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CRankOneCF[] = {  {&_swigt__p_limix__CRankOneCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CSingleTraitTerm[] = {  {&_swigt__p_limix__CSingleTraitTerm, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CSqExpCF[] = {  {&_swigt__p_limix__CSqExpCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CSumCF[] = {  {&_swigt__p_limix__CSumCF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CSumLinear[] = {  {&_swigt__p_limix__CSumLinear, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CTextfileGenotypeContainer[] = {  {&_swigt__p_limix__CTextfileGenotypeContainer, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__CVarianceDecomposition[] = {  {&_swigt__p_limix__CVarianceDecomposition, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t[] = {  {&_swigt__p_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t[] = {  {&_swigt__p_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__nLLevalFunctor[] = {  {&_swigt__p_limix__nLLevalFunctor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_limix__nLLevalKronFunctor[] = {  {&_swigt__p_limix__nLLevalKronFunctor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_mapped_type[] = {  {&_swigt__p_mapped_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_PyObject[] = {  {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 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__allocatorT_MatrixXd_t[] = {  {&_swigt__p_std__allocatorT_MatrixXd_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_VectorXi_t[] = {  {&_swigt__p_std__allocatorT_VectorXi_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t[] = {  {&_swigt__p_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_std__string_t[] = {  {&_swigt__p_std__allocatorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__exception[] = {  {&_swigt__p_std__exception, 0, 0, 0},  {&_swigt__p_limix__CLimixException, _p_limix__CLimixExceptionTo_p_std__exception, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__invalid_argument[] = {  {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__lessT_std__string_t[] = {  {&_swigt__p_std__lessT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t[] = {  {&_swigt__p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t, 0, 0, 0},  {&_swigt__p_limix__CGPHyperParams, _p_limix__CGPHyperParamsTo_p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__mapT_std__string_PCVoid_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_PCVoid_t_t_t[] = {  {&_swigt__p_std__mapT_std__string_PCVoid_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_PCVoid_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_MatrixXd_t[] = {  {&_swigt__p_std__shared_ptrT_MatrixXd_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_bool_t[] = {  {&_swigt__p_std__shared_ptrT_bool_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_bost__enable_shared_from_thisT_CGPbase_t_t[] = {  {&_swigt__p_std__shared_ptrT_bost__enable_shared_from_thisT_CGPbase_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__ACovarianceFunction_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CCovLinearISO_t, _p_std__shared_ptrT_limix__CCovLinearISO_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CFixedCF_t, _p_std__shared_ptrT_limix__CFixedCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CFixedDiagonalCF_t, _p_std__shared_ptrT_limix__CFixedDiagonalCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CDiagonalCF_t, _p_std__shared_ptrT_limix__CDiagonalCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CProductCF_t, _p_std__shared_ptrT_limix__CProductCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CFreeFormCF_t, _p_std__shared_ptrT_limix__CFreeFormCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CRankOneCF_t, _p_std__shared_ptrT_limix__CRankOneCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CCovLinearARD_t, _p_std__shared_ptrT_limix__CCovLinearARD_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLinCombCF_t, _p_std__shared_ptrT_limix__CLinCombCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__ALikelihood_t, _p_std__shared_ptrT_limix__ALikelihood_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalNULL_t, _p_std__shared_ptrT_limix__CLikNormalNULL_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CKroneckerCF_t, _p_std__shared_ptrT_limix__CKroneckerCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__AMultiCF_t, _p_std__shared_ptrT_limix__AMultiCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CSumCF_t, _p_std__shared_ptrT_limix__CSumCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CRank1diagCF_t, _p_std__shared_ptrT_limix__CRank1diagCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalSVD_t, _p_std__shared_ptrT_limix__CLikNormalSVD_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalIso_t, _p_std__shared_ptrT_limix__CLikNormalIso_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CSqExpCF_t, _p_std__shared_ptrT_limix__CSqExpCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CCovSqexpARD_t, _p_std__shared_ptrT_limix__CCovSqexpARD_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CCovLinearISODelta_t, _p_std__shared_ptrT_limix__CCovLinearISODelta_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CPolyCF_t, _p_std__shared_ptrT_limix__CPolyCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLowRankCF_t, _p_std__shared_ptrT_limix__CLowRankCF_tTo_p_std__shared_ptrT_limix__ACovarianceFunction_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__ADataTerm_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CSumLinear_t, _p_std__shared_ptrT_limix__CSumLinear_tTo_p_std__shared_ptrT_limix__ADataTerm_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLinearMean_t, _p_std__shared_ptrT_limix__CLinearMean_tTo_p_std__shared_ptrT_limix__ADataTerm_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CKroneckerMean_t, _p_std__shared_ptrT_limix__CKroneckerMean_tTo_p_std__shared_ptrT_limix__ADataTerm_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__ADataTerm_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CData_t, _p_std__shared_ptrT_limix__CData_tTo_p_std__shared_ptrT_limix__ADataTerm_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__AGenotypeContainer_t[] = {  {&_swigt__p_std__shared_ptrT_limix__AGenotypeContainer_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CMemGenotypeContainer_t, _p_std__shared_ptrT_limix__CMemGenotypeContainer_tTo_p_std__shared_ptrT_limix__AGenotypeContainer_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, _p_std__shared_ptrT_limix__CTextfileGenotypeContainer_tTo_p_std__shared_ptrT_limix__AGenotypeContainer_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__ALMM_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CInteractLMM_t, _p_std__shared_ptrT_limix__CInteractLMM_tTo_p_std__shared_ptrT_limix__ALMM_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLMM_t, _p_std__shared_ptrT_limix__CLMM_tTo_p_std__shared_ptrT_limix__ALMM_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CKroneckerLMM_t, _p_std__shared_ptrT_limix__CKroneckerLMM_tTo_p_std__shared_ptrT_limix__ALMM_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__ALMM_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__ALikelihood_t[] = {  {&_swigt__p_std__shared_ptrT_limix__ALikelihood_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalNULL_t, _p_std__shared_ptrT_limix__CLikNormalNULL_tTo_p_std__shared_ptrT_limix__ALikelihood_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalIso_t, _p_std__shared_ptrT_limix__CLikNormalIso_tTo_p_std__shared_ptrT_limix__ALikelihood_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalSVD_t, _p_std__shared_ptrT_limix__CLikNormalSVD_tTo_p_std__shared_ptrT_limix__ALikelihood_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__AMultiCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CKroneckerCF_t, _p_std__shared_ptrT_limix__CKroneckerCF_tTo_p_std__shared_ptrT_limix__AMultiCF_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLinCombCF_t, _p_std__shared_ptrT_limix__CLinCombCF_tTo_p_std__shared_ptrT_limix__AMultiCF_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__AMultiCF_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CProductCF_t, _p_std__shared_ptrT_limix__CProductCF_tTo_p_std__shared_ptrT_limix__AMultiCF_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CSumCF_t, _p_std__shared_ptrT_limix__CSumCF_tTo_p_std__shared_ptrT_limix__AMultiCF_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t[] = {  {&_swigt__p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGenotypeBlock_t, _p_std__shared_ptrT_limix__CGenotypeBlock_tTo_p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__AVarianceTerm_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CSingleTraitTerm_t, _p_std__shared_ptrT_limix__CSingleTraitTerm_tTo_p_std__shared_ptrT_limix__AVarianceTerm_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CMultiTraitTerm_t, _p_std__shared_ptrT_limix__CMultiTraitTerm_tTo_p_std__shared_ptrT_limix__AVarianceTerm_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__AVarianceTerm_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CCovLinearARD_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CCovLinearARD_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CCovLinearISODelta_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CCovLinearISODelta_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CCovLinearISO_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CCovLinearISO_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CCovSqexpARD_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CCovSqexpARD_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CCovarianceFunctionCache_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CCovarianceFunctionCache_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CData_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CData_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CDiagonalCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CDiagonalCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CFixedCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CFixedCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CFixedDiagonalCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CFixedDiagonalCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CFreeFormCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CFreeFormCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPCholCache_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPCholCache_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPHyperParams_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPHyperParams_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPKroneckerCache_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPKroneckerCache_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPLMM_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPLMM_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPSumCache_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPSumCache_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPSum_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPSum_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPbase_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPkronSum_t, _p_std__shared_ptrT_limix__CGPkronSum_tTo_p_std__shared_ptrT_limix__CGPbase_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGPbase_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGPkronecker_t, _p_std__shared_ptrT_limix__CGPkronecker_tTo_p_std__shared_ptrT_limix__CGPbase_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGPSum_t, _p_std__shared_ptrT_limix__CGPSum_tTo_p_std__shared_ptrT_limix__CGPbase_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPkronSumCache_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPkronSumCache_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPkronSum_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPkronSum_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPkronecker_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPkronecker_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPopt_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPopt_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGPvarDecomp_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGPvarDecomp_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CGenotypeBlock_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CGenotypeBlock_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CHeaderMap_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CHeaderMap_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CInteractLMM_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CInteractLMM_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CKroneckerCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CKroneckerCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CKroneckerLMM_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CKroneckerLMM_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CKroneckerMean_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CKroneckerMean_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLMMCore_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CLMMCore_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLMMKroneckerCore_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CLMMKroneckerCore_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLMM_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CInteractLMM_t, _p_std__shared_ptrT_limix__CInteractLMM_tTo_p_std__shared_ptrT_limix__CLMM_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLMM_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLikNormalIso_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CLikNormalIso_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLikNormalNULL_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CLikNormalNULL_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLikNormalSVD_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CLikNormalSVD_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLinCombCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CLinCombCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLinearMean_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CLinearMean_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CKroneckerMean_t, _p_std__shared_ptrT_limix__CKroneckerMean_tTo_p_std__shared_ptrT_limix__CLinearMean_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CLowRankCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CLowRankCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CMemGenotypeContainer_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CMemGenotypeContainer_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CMultiTraitTerm_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CMultiTraitTerm_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CMultiTraitVQTL_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CMultiTraitVQTL_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CNamedCache_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CNamedCache_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CParamObject_t[] = {  {&_swigt__p_std__shared_ptrT_limix__ADataTerm_t, _p_std__shared_ptrT_limix__ADataTerm_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__AMultiCF_t, _p_std__shared_ptrT_limix__AMultiCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CParamObject_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGPSumCache_t, _p_std__shared_ptrT_limix__CGPSumCache_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGPkronSumCache_t, _p_std__shared_ptrT_limix__CGPkronSumCache_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CNamedCache_t, _p_std__shared_ptrT_limix__CNamedCache_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGPCholCache_t, _p_std__shared_ptrT_limix__CGPCholCache_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGPKroneckerCache_t, _p_std__shared_ptrT_limix__CGPKroneckerCache_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLinearMean_t, _p_std__shared_ptrT_limix__CLinearMean_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CKroneckerMean_t, _p_std__shared_ptrT_limix__CKroneckerMean_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__ACovarianceFunction_t, _p_std__shared_ptrT_limix__ACovarianceFunction_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CSqExpCF_t, _p_std__shared_ptrT_limix__CSqExpCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CCovLinearISO_t, _p_std__shared_ptrT_limix__CCovLinearISO_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CCovSqexpARD_t, _p_std__shared_ptrT_limix__CCovSqexpARD_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__ALikelihood_t, _p_std__shared_ptrT_limix__ALikelihood_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CFreeFormCF_t, _p_std__shared_ptrT_limix__CFreeFormCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalSVD_t, _p_std__shared_ptrT_limix__CLikNormalSVD_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLowRankCF_t, _p_std__shared_ptrT_limix__CLowRankCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CCovLinearISODelta_t, _p_std__shared_ptrT_limix__CCovLinearISODelta_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CSumLinear_t, _p_std__shared_ptrT_limix__CSumLinear_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalNULL_t, _p_std__shared_ptrT_limix__CLikNormalNULL_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CProductCF_t, _p_std__shared_ptrT_limix__CProductCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLikNormalIso_t, _p_std__shared_ptrT_limix__CLikNormalIso_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CFixedDiagonalCF_t, _p_std__shared_ptrT_limix__CFixedDiagonalCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CDiagonalCF_t, _p_std__shared_ptrT_limix__CDiagonalCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CFixedCF_t, _p_std__shared_ptrT_limix__CFixedCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CKroneckerCF_t, _p_std__shared_ptrT_limix__CKroneckerCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CPolyCF_t, _p_std__shared_ptrT_limix__CPolyCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CRank1diagCF_t, _p_std__shared_ptrT_limix__CRank1diagCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CLinCombCF_t, _p_std__shared_ptrT_limix__CLinCombCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CSumCF_t, _p_std__shared_ptrT_limix__CSumCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t, _p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CRankOneCF_t, _p_std__shared_ptrT_limix__CRankOneCF_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CData_t, _p_std__shared_ptrT_limix__CData_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CCovLinearARD_t, _p_std__shared_ptrT_limix__CCovLinearARD_tTo_p_std__shared_ptrT_limix__CParamObject_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CPolyCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CPolyCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CProductCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CProductCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGenotypeBlock_t, _p_std__shared_ptrT_limix__CGenotypeBlock_tTo_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, _p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_tTo_p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CRank1diagCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CRank1diagCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CRankOneCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CRankOneCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CSingleTraitTerm_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CSingleTraitTerm_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CSqExpCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CSqExpCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CSumCF_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CSumCF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CSumLinear_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CSumLinear_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CVarianceDecomposition_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CVarianceDecomposition_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__CVqtl_t[] = {  {&_swigt__p_std__shared_ptrT_limix__CVqtl_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t_t[] = {  {&_swigt__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t_t[] = {  {&_swigt__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_limix__stringVec_t[] = {  {&_swigt__p_std__shared_ptrT_limix__stringVec_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t[] = {  {&_swigt__p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0, 0, 0},  {&_swigt__p_std__shared_ptrT_limix__CGPHyperParams_t, _p_std__shared_ptrT_limix__CGPHyperParams_tTo_p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t[] = {  {&_swigt__p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t[] = {  {&_swigt__p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t[] = {  {&_swigt__p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_bool_t_std__allocatorT_std__shared_ptrT_bool_t_t_t[] = {  {&_swigt__p_std__vectorT_std__shared_ptrT_bool_t_std__allocatorT_std__shared_ptrT_bool_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t[] = {  {&_swigt__p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_limix__AVarianceTerm_t_std__allocatorT_std__shared_ptrT_limix__AVarianceTerm_t_t_t[] = {  {&_swigt__p_std__vectorT_std__shared_ptrT_limix__AVarianceTerm_t_std__allocatorT_std__shared_ptrT_limix__AVarianceTerm_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_limix__CLinearMean_t_std__allocatorT_std__shared_ptrT_limix__CLinearMean_t_t_t[] = {  {&_swigt__p_std__vectorT_std__shared_ptrT_limix__CLinearMean_t_std__allocatorT_std__shared_ptrT_limix__CLinearMean_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__string_std__allocatorT_std__string_t_t[] = {  {&_swigt__p_std__vectorT_std__string_std__allocatorT_std__string_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_swig__SwigPyIterator[] = {  {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 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_long[] = {  {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 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_MatrixXb,
  _swigc__p_MatrixXd,
  _swigc__p_MatrixXdChol,
  _swigc__p_MatrixXi,
  _swigc__p_PCVoid,
  _swigc__p_PMatrixXd,
  _swigc__p_PVectorXi,
  _swigc__p_VectorXd,
  _swigc__p_VectorXi,
  _swigc__p_allocator_type,
  _swigc__p_char,
  _swigc__p_difference_type,
  _swigc__p_double,
  _swigc__p_float,
  _swigc__p_int,
  _swigc__p_key_type,
  _swigc__p_limix__ACovarianceFunction,
  _swigc__p_limix__ADataTerm,
  _swigc__p_limix__AGenotypeContainer,
  _swigc__p_limix__ALMM,
  _swigc__p_limix__ALikelihood,
  _swigc__p_limix__AMultiCF,
  _swigc__p_limix__ARDataFrameT_MatrixXd_t,
  _swigc__p_limix__AVarianceTerm,
  _swigc__p_limix__AWDataFrameT_MatrixXd_t,
  _swigc__p_limix__CCovLinearARD,
  _swigc__p_limix__CCovLinearISO,
  _swigc__p_limix__CCovLinearISODelta,
  _swigc__p_limix__CCovSqexpARD,
  _swigc__p_limix__CCovarianceFunctionCacheOld,
  _swigc__p_limix__CData,
  _swigc__p_limix__CDiagonalCF,
  _swigc__p_limix__CFixedCF,
  _swigc__p_limix__CFixedDiagonalCF,
  _swigc__p_limix__CFreeFormCF,
  _swigc__p_limix__CGPCholCache,
  _swigc__p_limix__CGPHyperParams,
  _swigc__p_limix__CGPKroneckerCache,
  _swigc__p_limix__CGPSum,
  _swigc__p_limix__CGPSumCache,
  _swigc__p_limix__CGPbase,
  _swigc__p_limix__CGPkronSum,
  _swigc__p_limix__CGPkronSumCache,
  _swigc__p_limix__CGPkronecker,
  _swigc__p_limix__CGPopt,
  _swigc__p_limix__CGenotypeBlock,
  _swigc__p_limix__CHeaderMap,
  _swigc__p_limix__CInteractLMM,
  _swigc__p_limix__CKroneckerCF,
  _swigc__p_limix__CKroneckerLMM,
  _swigc__p_limix__CKroneckerMean,
  _swigc__p_limix__CLMM,
  _swigc__p_limix__CLMMCore,
  _swigc__p_limix__CLMMKroneckerCore,
  _swigc__p_limix__CLikNormalIso,
  _swigc__p_limix__CLikNormalNULL,
  _swigc__p_limix__CLikNormalSVD,
  _swigc__p_limix__CLimixException,
  _swigc__p_limix__CLinCombCF,
  _swigc__p_limix__CLinearMean,
  _swigc__p_limix__CLowRankCF,
  _swigc__p_limix__CMemGenotypeContainer,
  _swigc__p_limix__CMultiTraitTerm,
  _swigc__p_limix__CNamedCache,
  _swigc__p_limix__CParamObject,
  _swigc__p_limix__CPolyCF,
  _swigc__p_limix__CProductCF,
  _swigc__p_limix__CRMemDataFrameT_MatrixXd_t,
  _swigc__p_limix__CRWMemDataFrameT_MatrixXd_t,
  _swigc__p_limix__CRank1diagCF,
  _swigc__p_limix__CRankOneCF,
  _swigc__p_limix__CSingleTraitTerm,
  _swigc__p_limix__CSqExpCF,
  _swigc__p_limix__CSumCF,
  _swigc__p_limix__CSumLinear,
  _swigc__p_limix__CTextfileGenotypeContainer,
  _swigc__p_limix__CVarianceDecomposition,
  _swigc__p_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t,
  _swigc__p_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t,
  _swigc__p_limix__nLLevalFunctor,
  _swigc__p_limix__nLLevalKronFunctor,
  _swigc__p_long_long,
  _swigc__p_mapped_type,
  _swigc__p_p_PyObject,
  _swigc__p_short,
  _swigc__p_signed_char,
  _swigc__p_size_type,
  _swigc__p_std__allocatorT_MatrixXd_t,
  _swigc__p_std__allocatorT_VectorXi_t,
  _swigc__p_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t,
  _swigc__p_std__allocatorT_std__string_t,
  _swigc__p_std__exception,
  _swigc__p_std__invalid_argument,
  _swigc__p_std__lessT_std__string_t,
  _swigc__p_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t,
  _swigc__p_std__mapT_std__string_PCVoid_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_PCVoid_t_t_t,
  _swigc__p_std__shared_ptrT_MatrixXd_t,
  _swigc__p_std__shared_ptrT_bool_t,
  _swigc__p_std__shared_ptrT_bost__enable_shared_from_thisT_CGPbase_t_t,
  _swigc__p_std__shared_ptrT_limix__ACovarianceFunction_t,
  _swigc__p_std__shared_ptrT_limix__ADataTerm_t,
  _swigc__p_std__shared_ptrT_limix__AGenotypeContainer_t,
  _swigc__p_std__shared_ptrT_limix__ALMM_t,
  _swigc__p_std__shared_ptrT_limix__ALikelihood_t,
  _swigc__p_std__shared_ptrT_limix__AMultiCF_t,
  _swigc__p_std__shared_ptrT_limix__ARDataFrameT_MatrixXd_t_t,
  _swigc__p_std__shared_ptrT_limix__AVarianceTerm_t,
  _swigc__p_std__shared_ptrT_limix__CCovLinearARD_t,
  _swigc__p_std__shared_ptrT_limix__CCovLinearISODelta_t,
  _swigc__p_std__shared_ptrT_limix__CCovLinearISO_t,
  _swigc__p_std__shared_ptrT_limix__CCovSqexpARD_t,
  _swigc__p_std__shared_ptrT_limix__CCovarianceFunctionCacheOld_t,
  _swigc__p_std__shared_ptrT_limix__CCovarianceFunctionCache_t,
  _swigc__p_std__shared_ptrT_limix__CData_t,
  _swigc__p_std__shared_ptrT_limix__CDiagonalCF_t,
  _swigc__p_std__shared_ptrT_limix__CFixedCF_t,
  _swigc__p_std__shared_ptrT_limix__CFixedDiagonalCF_t,
  _swigc__p_std__shared_ptrT_limix__CFreeFormCF_t,
  _swigc__p_std__shared_ptrT_limix__CGPCholCache_t,
  _swigc__p_std__shared_ptrT_limix__CGPHyperParams_t,
  _swigc__p_std__shared_ptrT_limix__CGPKroneckerCache_t,
  _swigc__p_std__shared_ptrT_limix__CGPLMM_t,
  _swigc__p_std__shared_ptrT_limix__CGPSumCache_t,
  _swigc__p_std__shared_ptrT_limix__CGPSum_t,
  _swigc__p_std__shared_ptrT_limix__CGPbase_t,
  _swigc__p_std__shared_ptrT_limix__CGPkronSumCache_t,
  _swigc__p_std__shared_ptrT_limix__CGPkronSum_t,
  _swigc__p_std__shared_ptrT_limix__CGPkronecker_t,
  _swigc__p_std__shared_ptrT_limix__CGPopt_t,
  _swigc__p_std__shared_ptrT_limix__CGPvarDecomp_t,
  _swigc__p_std__shared_ptrT_limix__CGenotypeBlock_t,
  _swigc__p_std__shared_ptrT_limix__CHeaderMap_t,
  _swigc__p_std__shared_ptrT_limix__CInteractLMM_t,
  _swigc__p_std__shared_ptrT_limix__CKroneckerCF_t,
  _swigc__p_std__shared_ptrT_limix__CKroneckerLMM_t,
  _swigc__p_std__shared_ptrT_limix__CKroneckerMean_t,
  _swigc__p_std__shared_ptrT_limix__CLMMCore_t,
  _swigc__p_std__shared_ptrT_limix__CLMMKroneckerCore_t,
  _swigc__p_std__shared_ptrT_limix__CLMM_t,
  _swigc__p_std__shared_ptrT_limix__CLikNormalIso_t,
  _swigc__p_std__shared_ptrT_limix__CLikNormalNULL_t,
  _swigc__p_std__shared_ptrT_limix__CLikNormalSVD_t,
  _swigc__p_std__shared_ptrT_limix__CLinCombCF_t,
  _swigc__p_std__shared_ptrT_limix__CLinearMean_t,
  _swigc__p_std__shared_ptrT_limix__CLowRankCF_t,
  _swigc__p_std__shared_ptrT_limix__CMemGenotypeContainer_t,
  _swigc__p_std__shared_ptrT_limix__CMultiTraitTerm_t,
  _swigc__p_std__shared_ptrT_limix__CMultiTraitVQTL_t,
  _swigc__p_std__shared_ptrT_limix__CNamedCache_t,
  _swigc__p_std__shared_ptrT_limix__CParamObject_t,
  _swigc__p_std__shared_ptrT_limix__CPolyCF_t,
  _swigc__p_std__shared_ptrT_limix__CProductCF_t,
  _swigc__p_std__shared_ptrT_limix__CRMemDataFrameT_MatrixXd_t_t,
  _swigc__p_std__shared_ptrT_limix__CRWMemDataFrameT_MatrixXd_t_t,
  _swigc__p_std__shared_ptrT_limix__CRank1diagCF_t,
  _swigc__p_std__shared_ptrT_limix__CRankOneCF_t,
  _swigc__p_std__shared_ptrT_limix__CSingleTraitTerm_t,
  _swigc__p_std__shared_ptrT_limix__CSqExpCF_t,
  _swigc__p_std__shared_ptrT_limix__CSumCF_t,
  _swigc__p_std__shared_ptrT_limix__CSumLinear_t,
  _swigc__p_std__shared_ptrT_limix__CTextfileGenotypeContainer_t,
  _swigc__p_std__shared_ptrT_limix__CVarianceDecomposition_t,
  _swigc__p_std__shared_ptrT_limix__CVqtl_t,
  _swigc__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_1_Eigen__ColMajor_t_t,
  _swigc__p_std__shared_ptrT_limix__FlexEigenMatrixT_Eigen__Dynamic_Eigen__Dynamic_Eigen__ColMajor_t_t,
  _swigc__p_std__shared_ptrT_limix__stringVec_t,
  _swigc__p_std__shared_ptrT_std__mapT_std__string_MatrixXd_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_MatrixXd_t_t_t_t,
  _swigc__p_std__vectorT_MatrixXd_std__allocatorT_MatrixXd_t_t,
  _swigc__p_std__vectorT_VectorXi_std__allocatorT_VectorXi_t_t,
  _swigc__p_std__vectorT_limix__CGPHyperParams_std__allocatorT_limix__CGPHyperParams_t_t,
  _swigc__p_std__vectorT_std__shared_ptrT_bool_t_std__allocatorT_std__shared_ptrT_bool_t_t_t,
  _swigc__p_std__vectorT_std__shared_ptrT_limix__ACovarianceFunction_t_std__allocatorT_std__shared_ptrT_limix__ACovarianceFunction_t_t_t,
  _swigc__p_std__vectorT_std__shared_ptrT_limix__AVarianceTerm_t_std__allocatorT_std__shared_ptrT_limix__AVarianceTerm_t_t_t,
  _swigc__p_std__vectorT_std__shared_ptrT_limix__CLinearMean_t_std__allocatorT_std__shared_ptrT_limix__CLinearMean_t_t_t,
  _swigc__p_std__vectorT_std__string_std__allocatorT_std__string_t_t,
  _swigc__p_swig__SwigPyIterator,
  _swigc__p_unsigned_char,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long_long,
  _swigc__p_unsigned_short,
  _swigc__p_value_type,
};


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

static swig_const_info swig_const_table[] = {
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
 * 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



#ifdef __cplusplus
extern "C" {
#endif
  
  /* Python-specific SWIG API */
#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
  
  /* -----------------------------------------------------------------------------
   * global variable support code.
   * ----------------------------------------------------------------------------- */
  
  typedef struct swig_globalvar {
    char       *name;                  /* Name of global variable */
    PyObject *(*get_attr)(void);       /* Return the current value */
    int       (*set_attr)(PyObject *); /* Set the value */
    struct swig_globalvar *next;
  } swig_globalvar;
  
  typedef struct swig_varlinkobject {
    PyObject_HEAD
    swig_globalvar *vars;
  } swig_varlinkobject;
  
  SWIGINTERN PyObject *
  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
#if PY_VERSION_HEX >= 0x03000000
    return PyUnicode_InternFromString("<Swig global variables>");
#else
    return PyString_FromString("<Swig global variables>");
#endif
  }
  
  SWIGINTERN PyObject *
  swig_varlink_str(swig_varlinkobject *v) {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *str = PyUnicode_InternFromString("(");
    PyObject *tail;
    PyObject *joined;
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      tail = PyUnicode_FromString(var->name);
      joined = PyUnicode_Concat(str, tail);
      Py_DecRef(str);
      Py_DecRef(tail);
      str = joined;
      if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        Py_DecRef(str);
        Py_DecRef(tail);
        str = joined;
      }
    }
    tail = PyUnicode_InternFromString(")");
    joined = PyUnicode_Concat(str, tail);
    Py_DecRef(str);
    Py_DecRef(tail);
    str = joined;
#else
    PyObject *str = PyString_FromString("(");
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
    }
    PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
    return str;
  }
  
  SWIGINTERN int
  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
    char *tmp;
    PyObject *str = swig_varlink_str(v);
    fprintf(fp,"Swig global variables ");
    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(str);
    return 0;
  }
  
  SWIGINTERN void
  swig_varlink_dealloc(swig_varlinkobject *v) {
    swig_globalvar *var = v->vars;
    while (var) {
      swig_globalvar *n = var->next;
      free(var->name);
      free(var);
      var = n;
    }
  }
  
  SWIGINTERN PyObject *
  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
    PyObject *res = NULL;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->get_attr)();
        break;
      }
      var = var->next;
    }
    if (res == NULL && !PyErr_Occurred()) {
      PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
    }
    return res;
  }
  
  SWIGINTERN int
  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
    int res = 1;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->set_attr)(p);
        break;
      }
      var = var->next;
    }
    if (res == 1 && !PyErr_Occurred()) {
      PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
    }
    return res;
  }
  
  SWIGINTERN PyTypeObject*
  swig_varlink_type(void) {
    static char varlink__doc__[] = "Swig var link object";
    static PyTypeObject varlink_type;
    static int type_init = 0;
    if (!type_init) {
      const PyTypeObject tmp = {
        /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000
        PyVarObject_HEAD_INIT(NULL, 0)
#else
        PyObject_HEAD_INIT(NULL)
        0,                                  /* ob_size */
#endif
        (char *)"swigvarlink",              /* tp_name */
        sizeof(swig_varlinkobject),         /* tp_basicsize */
        0,                                  /* tp_itemsize */
        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
        (printfunc) swig_varlink_print,     /* tp_print */
        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
        0,                                  /* tp_compare */
        (reprfunc) swig_varlink_repr,       /* tp_repr */
        0,                                  /* tp_as_number */
        0,                                  /* tp_as_sequence */
        0,                                  /* tp_as_mapping */
        0,                                  /* tp_hash */
        0,                                  /* tp_call */
        (reprfunc) swig_varlink_str,        /* tp_str */
        0,                                  /* tp_getattro */
        0,                                  /* tp_setattro */
        0,                                  /* tp_as_buffer */
        0,                                  /* tp_flags */
        varlink__doc__,                     /* tp_doc */
        0,                                  /* tp_traverse */
        0,                                  /* tp_clear */
        0,                                  /* tp_richcompare */
        0,                                  /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
        0,                                  /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
        0,                                  /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
        0,                                  /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
        0,                                  /* tp_allocs */
        0,                                  /* tp_frees */
        0,                                  /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
        0,                                  /* tp_prev */
#endif
        0                                   /* tp_next */
#endif
      };
      varlink_type = tmp;
      type_init = 1;
#if PY_VERSION_HEX < 0x02020000
      varlink_type.ob_type = &PyType_Type;
#else
      if (PyType_Ready(&varlink_type) < 0)
      return NULL;
#endif
    }
    return &varlink_type;
  }
  
  /* Create a variable linking object for use later */
  SWIGINTERN PyObject *
  SWIG_Python_newvarlink(void) {
    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
    if (result) {
      result->vars = 0;
    }
    return ((PyObject*) result);
  }
  
  SWIGINTERN void 
  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
    swig_varlinkobject *v = (swig_varlinkobject *) p;
    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
    if (gv) {
      size_t size = strlen(name)+1;
      gv->name = (char *)malloc(size);
      if (gv->name) {
        strncpy(gv->name,name,size);
        gv->get_attr = get_attr;
        gv->set_attr = set_attr;
        gv->next = v->vars;
      }
    }
    v->vars = gv;
  }
  
  SWIGINTERN PyObject *
  SWIG_globals(void) {
    static PyObject *_SWIG_globals = 0; 
    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
    return _SWIG_globals;
  }
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_PY_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        PyDict_SetItemString(d, constants[i].name, obj);
        Py_DECREF(obj);
      }
    }
  }
  
  /* -----------------------------------------------------------------------------*/
  /* Fix SwigMethods to carry the callback ptrs when needed */
  /* -----------------------------------------------------------------------------*/
  
  SWIGINTERN void
  SWIG_Python_FixMethods(PyMethodDef *methods,
    swig_const_info *const_table,
    swig_type_info **types,
    swig_type_info **types_initial) {
    size_t i;
    for (i = 0; methods[i].ml_name; ++i) {
      const char *c = methods[i].ml_doc;
      if (!c) continue;
      c = strstr(c, "swig_ptr: ");
      if (c) {
        int j;
        swig_const_info *ci = 0;
        const char *name = c + 10;
        for (j = 0; const_table[j].type; ++j) {
          if (strncmp(const_table[j].name, name, 
              strlen(const_table[j].name)) == 0) {
            ci = &(const_table[j]);
            break;
          }
        }
        if (ci) {
          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
          if (ptr) {
            size_t shift = (ci->ptype) - types;
            swig_type_info *ty = types_initial[shift];
            size_t ldoc = (c - methods[i].ml_doc);
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
            char *ndoc = (char*)malloc(ldoc + lptr + 10);
            if (ndoc) {
              char *buff = ndoc;
              strncpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              strncpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
  PyObject *m, *d, *md;
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
# if PY_VERSION_HEX >= 0x03020000
    PyModuleDef_HEAD_INIT,
# else
    {
      PyObject_HEAD_INIT(NULL)
      NULL, /* m_init */
      0,    /* m_index */
      NULL, /* m_copy */
    },
# endif
    (char *) SWIG_name,
    NULL,
    -1,
    SwigMethods,
    NULL,
    NULL,
    NULL,
    NULL
  };
#endif
  
#if defined(SWIGPYTHON_BUILTIN)
  static SwigPyClientData SwigPyObject_clientdata = {
    0, 0, 0, 0, 0, 0, 0
  };
  static PyGetSetDef this_getset_def = {
    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  };
  static SwigPyGetSet thisown_getset_closure = {
    (PyCFunction) SwigPyObject_own,
    (PyCFunction) SwigPyObject_own
  };
  static PyGetSetDef thisown_getset_def = {
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  };
  PyObject *metatype_args;
  PyTypeObject *builtin_pytype;
  int builtin_base_count;
  swig_type_info *builtin_basetype;
  PyObject *tuple;
  PyGetSetDescrObject *static_getset;
  PyTypeObject *metatype;
  SwigPyClientData *cd;
  PyObject *public_interface, *public_symbol;
  PyObject *this_descr;
  PyObject *thisown_descr;
  PyObject *self = 0;
  int i;
  
  (void)builtin_pytype;
  (void)builtin_base_count;
  (void)builtin_basetype;
  (void)tuple;
  (void)static_getset;
  (void)self;
  
  /* metatype is used to implement static member variables. */
  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
  assert(metatype_args);
  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
  assert(metatype);
  Py_DECREF(metatype_args);
  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
  assert(PyType_Ready(metatype) >= 0);
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#if PY_VERSION_HEX >= 0x03000000
  m = PyModule_Create(&SWIG_module);
#else
  m = Py_InitModule((char *) SWIG_name, SwigMethods);
#endif
  
  md = d = PyModule_GetDict(m);
  (void)md;
  
  SWIG_InitializeModule(0);
  
#ifdef SWIGPYTHON_BUILTIN
  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  assert(SwigPyObject_stype);
  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  if (!cd) {
    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000
    return NULL;
# else
    return;
# endif
  }
  
  /* All objects have a 'this' attribute */
  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  (void)this_descr;
  
  /* All objects have a 'thisown' attribute */
  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  (void)thisown_descr;
  
  public_interface = PyList_New(0);
  public_symbol = 0;
  (void)public_symbol;
  
  PyDict_SetItemString(md, "__all__", public_interface);
  Py_DECREF(public_interface);
  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  for (i = 0; swig_const_table[i].name != 0; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
#endif
  
  SWIG_InstallConstants(d,swig_const_table);
  
  
  import_array();
  
  PyDict_SetItemString(md,(char*)"cvar", SWIG_globals());
  SWIG_addvarlink(SWIG_globals(),(char*)"L2pi",Swig_var_L2pi_get, Swig_var_L2pi_set);
  SWIG_Python_SetConstant(d, "ALMM_TEST_LRT",SWIG_From_int(static_cast< int >(limix::ALMM::TEST_LRT)));
  SWIG_Python_SetConstant(d, "ALMM_TEST_F",SWIG_From_int(static_cast< int >(limix::ALMM::TEST_F)));
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

