⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ghmmwrapper_wrap.c

📁 General Hidden Markov Model Library 一个通用的隐马尔科夫模型的C代码库
💻 C
📖 第 1 页 / 共 5 页
字号:
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.23 *  * 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.  * ----------------------------------------------------------------------------- */#define SWIGPYTHON#ifndef SWIG_TEMPLATE_DISAMBIGUATOR#  if defined(__SUNPRO_CC) #    define SWIG_TEMPLATE_DISAMBIGUATOR template#  else#    define SWIG_TEMPLATE_DISAMBIGUATOR #  endif#endif#include <Python.h>/*********************************************************************** * common.swg * *     This file contains generic SWIG runtime support for pointer *     type checking as well as a few commonly used macros to control *     external linkage. * * Author : David Beazley (beazley@cs.uchicago.edu) * * Copyright (c) 1999-2000, The University of Chicago *  * This file may be freely redistributed without license or fee provided * this copyright message remains intact. ************************************************************************/#include <string.h>#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)#  if !defined(STATIC_LINKED)#    define SWIGEXPORT(a) __declspec(dllexport) a#  else#    define SWIGEXPORT(a) a#  endif#else#  define SWIGEXPORT(a) a#endif#define SWIGRUNTIME(x) static x#ifndef SWIGINLINE#if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))#  define SWIGINLINE inline#else#  define SWIGINLINE#endif#endif/* 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 "1"/* 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#ifdef __cplusplusextern "C" {#endiftypedef void *(*swig_converter_func)(void *);typedef struct swig_type_info *(*swig_dycast_func)(void **);typedef struct swig_type_info {  const char             *name;  swig_converter_func     converter;  const char             *str;  void                   *clientdata;  swig_dycast_func        dcast;  struct swig_type_info  *next;  struct swig_type_info  *prev;} swig_type_info;static swig_type_info *swig_type_list = 0;static swig_type_info **swig_type_list_handle = &swig_type_list;/*    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 ' '.*/static intSWIG_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;  }  return (l1 - f1) - (l2 - f2);}/*  Check type equivalence in a name list like <name1>|<name2>|...*/static intSWIG_TypeEquiv(const char *nb, const char *tb) {  int equiv = 0;  const char* te = tb + strlen(tb);  const char* ne = nb;  while (!equiv && *ne) {    for (nb = ne; *ne; ++ne) {      if (*ne == '|') break;    }    equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;    if (*ne) ++ne;  }  return equiv;}  /* Register a type mapping with the type-checking */static swig_type_info *SWIG_TypeRegister(swig_type_info *ti) {  swig_type_info *tc, *head, *ret, *next;  /* Check to see if this type has already been registered */  tc = *swig_type_list_handle;  while (tc) {    /* check simple type equivalence */    int typeequiv = (strcmp(tc->name, ti->name) == 0);       /* check full type equivalence, resolving typedefs */    if (!typeequiv) {      /* only if tc is not a typedef (no '|' on it) */      if (tc->str && ti->str && !strstr(tc->str,"|")) {	typeequiv = SWIG_TypeEquiv(ti->str,tc->str);      }    }    if (typeequiv) {      /* Already exists in the table.  Just add additional types to the list */      if (ti->clientdata) tc->clientdata = ti->clientdata;      head = tc;      next = tc->next;      goto l1;    }    tc = tc->prev;  }  head = ti;  next = 0;  /* Place in list */  ti->prev = *swig_type_list_handle;  *swig_type_list_handle = ti;  /* Build linked lists */  l1:  ret = head;  tc = ti + 1;  /* Patch up the rest of the links */  while (tc->name) {    head->next = tc;    tc->prev = head;    head = tc;    tc++;  }  if (next) next->prev = head;  head->next = next;  return ret;}/* Check the typename */static swig_type_info *SWIG_TypeCheck(char *c, swig_type_info *ty) {  swig_type_info *s;  if (!ty) return 0;        /* Void pointer */  s = ty->next;             /* First element always just a name */  do {    if (strcmp(s->name,c) == 0) {      if (s == ty->next) return s;      /* Move s to the top of the linked list */      s->prev->next = s->next;      if (s->next) {        s->next->prev = s->prev;      }      /* Insert s as second element in the list */      s->next = ty->next;      if (ty->next) ty->next->prev = s;      ty->next = s;      s->prev = ty;      return s;    }    s = s->next;  } while (s && (s != ty->next));  return 0;}/* Cast a pointer up an inheritance hierarchy */static SWIGINLINE void *SWIG_TypeCast(swig_type_info *ty, void *ptr) {  if ((!ty) || (!ty->converter)) return ptr;  return (*ty->converter)(ptr);}/* Dynamic pointer casting. Down an inheritance hierarchy */static 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 */static SWIGINLINE 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.*/static 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->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;}/* Search for a swig_type_info structure */static swig_type_info *SWIG_TypeQuery(const char *name) {  swig_type_info *ty = *swig_type_list_handle;  while (ty) {    if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;    if (ty->name && (strcmp(name,ty->name) == 0)) return ty;    ty = ty->prev;  }  return 0;}/* Set the clientdata field for a type */static voidSWIG_TypeClientData(swig_type_info *ti, void *clientdata) {  swig_type_info *tc, *equiv;  if (ti->clientdata) return;  /* if (ti->clientdata == clientdata) return; */  ti->clientdata = clientdata;  equiv = ti->next;  while (equiv) {    if (!equiv->converter) {      tc = *swig_type_list_handle;      while (tc) {        if ((strcmp(tc->name, equiv->name) == 0))          SWIG_TypeClientData(tc,clientdata);        tc = tc->prev;      }    }    equiv = equiv->next;  }}/* Pack binary data into a string */static char *SWIG_PackData(char *c, void *ptr, size_t sz) {  static char hex[17] = "0123456789abcdef";  unsigned char *u = (unsigned char *) ptr;  const unsigned char *eu =  u + sz;  register unsigned char uu;  for (; u != eu; ++u) {    uu = *u;    *(c++) = hex[(uu & 0xf0) >> 4];    *(c++) = hex[uu & 0xf];  }  return c;}/* Unpack binary data from a string */static char *SWIG_UnpackData(char *c, void *ptr, size_t sz) {  register unsigned char uu = 0;  register int d;  unsigned char *u = (unsigned char *) ptr;  const unsigned char *eu =  u + sz;  for (; u != eu; ++u) {    d = *(c++);    if ((d >= '0') && (d <= '9'))      uu = ((d - '0') << 4);    else if ((d >= 'a') && (d <= 'f'))      uu = ((d - ('a'-10)) << 4);    d = *(c++);    if ((d >= '0') && (d <= '9'))      uu |= (d - '0');    else if ((d >= 'a') && (d <= 'f'))      uu |= (d - ('a'-10));    *u = uu;  }  return c;}/* 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.*/static voidSWIG_PropagateClientData(swig_type_info *type) {  swig_type_info *equiv = type->next;  swig_type_info *tc;  if (!type->clientdata) return;  while (equiv) {    if (!equiv->converter) {      tc = *swig_type_list_handle;      while (tc) {        if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)          SWIG_TypeClientData(tc, type->clientdata);        tc = tc->prev;      }    }    equiv = equiv->next;  }}#ifdef __cplusplus}#endif/* ----------------------------------------------------------------------------- * SWIG API. Portion that goes into the runtime * ----------------------------------------------------------------------------- */#ifdef __cplusplusextern "C" {#endif/* ----------------------------------------------------------------------------- * for internal method declarations * ----------------------------------------------------------------------------- */#ifndef SWIGINTERN#define SWIGINTERN static #endif#ifndef SWIGINTERNSHORT#ifdef __cplusplus#define SWIGINTERNSHORT static inline #else /* C case */#define SWIGINTERNSHORT static #endif /* __cplusplus */#endif    /* Common SWIG API */#define SWIG_ConvertPtr(obj, pp, type, flags)    SWIG_Python_ConvertPtr(obj, pp, type, flags)#define SWIG_NewPointerObj(p, type, flags)       SWIG_Python_NewPointerObj(p, type, flags)#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags) /* 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_ConvertPacked(obj, ptr, sz, ty, flags)   SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)#define SWIG_NewPackedObj(ptr, sz, type)              SWIG_Python_NewPackedObj(ptr, sz, type)#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)/*  Exception handling in wrappers*/#define SWIG_fail                goto fail#define SWIG_arg_fail(arg)       SWIG_Python_ArgFail(arg)#define SWIG_append_errmsg(msg)   SWIG_Python_AddErrMesg(msg,0)#define SWIG_preppend_errmsg(msg) SWIG_Python_AddErrMesg(msg,1)#define SWIG_type_error(type,obj) SWIG_Python_TypeError(type,obj)#define SWIG_null_ref(type)       SWIG_Python_NullRef(type)/*  Contract support*/#define SWIG_contract_assert(expr, msg) \ if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else/* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- *//* Constant Types */#define SWIG_PY_INT     1#define SWIG_PY_FLOAT   2#define SWIG_PY_STRING  3#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;/* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- *//*  Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent  C/C++ pointers in the python side. Very useful for debugging, but  not always safe.*/#if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES)#  define SWIG_COBJECT_TYPES#endif/* Flags for pointer conversion */#define SWIG_POINTER_EXCEPTION     0x1#define SWIG_POINTER_DISOWN        0x2/* ----------------------------------------------------------------------------- * Alloc. memory flags * ----------------------------------------------------------------------------- */#define SWIG_OLDOBJ  1#define SWIG_NEWOBJ  SWIG_OLDOBJ + 1#define SWIG_PYSTR   SWIG_NEWOBJ + 1#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. * * Author : David Beazley (beazley@cs.uchicago.edu) ************************************************************************/#ifdef __cplusplusextern "C" {#endif/* ----------------------------------------------------------------------------- * global variable support code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -