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

📄 svmc_wrap.c

📁 LIBSVM is an integrated software for support vector classification. LIBSVM provides a simple interfa
💻 C
📖 第 1 页 / 共 5 页
字号:
        return NULL;    if (_argc1) {        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_struct_svm_model_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of svm_save_model. Expected _struct_svm_model_p.");        return NULL;        }    }    _result = (int )svm_save_model(_arg0,_arg1);    _resultobj = Py_BuildValue("i",_result);    return _resultobj;}static PyObject *_wrap_svm_load_model(PyObject *self, PyObject *args) {    PyObject * _resultobj;    struct svm_model * _result;    char * _arg0;    char _ptemp[128];    self = self;    if(!PyArg_ParseTuple(args,"s:svm_load_model",&_arg0))         return NULL;    _result = (struct svm_model *)svm_load_model(_arg0);    SWIG_MakePtr(_ptemp, (char *) _result,"_struct_svm_model_p");    _resultobj = Py_BuildValue("s",_ptemp);    return _resultobj;}static PyObject *_wrap_svm_predict(PyObject *self, PyObject *args) {    PyObject * _resultobj;    double  _result;    struct svm_model * _arg0;    struct svm_node * _arg1;    char * _argc0 = 0;    char * _argc1 = 0;    self = self;    if(!PyArg_ParseTuple(args,"ss:svm_predict",&_argc0,&_argc1))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_svm_model_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of svm_predict. Expected _struct_svm_model_p.");        return NULL;        }    }    if (_argc1) {        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_struct_svm_node_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of svm_predict. Expected _struct_svm_node_p.");        return NULL;        }    }    _result = (double )svm_predict(_arg0,_arg1);    _resultobj = Py_BuildValue("d",_result);    return _resultobj;}static PyObject *_wrap_svm_destroy_model(PyObject *self, PyObject *args) {    PyObject * _resultobj;    struct svm_model * _arg0;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"s:svm_destroy_model",&_argc0))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_struct_svm_model_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of svm_destroy_model. Expected _struct_svm_model_p.");        return NULL;        }    }    svm_destroy_model(_arg0);    Py_INCREF(Py_None);    _resultobj = Py_None;    return _resultobj;}static PyObject *_wrap_int_array(PyObject *self, PyObject *args) {    PyObject * _resultobj;    int * _result;    int  _arg0;    char _ptemp[128];    self = self;    if(!PyArg_ParseTuple(args,"i:int_array",&_arg0))         return NULL;    _result = (int *)int_array(_arg0);    SWIG_MakePtr(_ptemp, (char *) _result,"_int_p");    _resultobj = Py_BuildValue("s",_ptemp);{  if (!_result) {    SWIG_exception(SWIG_MemoryError,"Out of memory.");  }}    return _resultobj;}static PyObject *_wrap_int_destroy(PyObject *self, PyObject *args) {    PyObject * _resultobj;    int * _arg0;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"s:int_destroy",&_argc0))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_int_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of int_destroy. Expected _int_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    int_destroy(_arg0);    Py_INCREF(Py_None);    _resultobj = Py_None;    return _resultobj;}static PyObject *_wrap_int_get(PyObject *self, PyObject *args) {    PyObject * _resultobj;    int  _result;    int * _arg0;    int  _arg1;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"si:int_get",&_argc0,&_arg1))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_int_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of int_get. Expected _int_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    _result = (int )int_get(_arg0,_arg1);    _resultobj = Py_BuildValue("i",_result);    return _resultobj;}static PyObject *_wrap_int_set(PyObject *self, PyObject *args) {    PyObject * _resultobj;    int  _result;    int * _arg0;    int  _arg1;    int  _arg2;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"sii:int_set",&_argc0,&_arg1,&_arg2))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_int_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of int_set. Expected _int_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    _result = (int )int_set(_arg0,_arg1,_arg2);    _resultobj = Py_BuildValue("i",_result);    return _resultobj;}static PyObject *_wrap_double_array(PyObject *self, PyObject *args) {    PyObject * _resultobj;    double * _result;    int  _arg0;    char _ptemp[128];    self = self;    if(!PyArg_ParseTuple(args,"i:double_array",&_arg0))         return NULL;    _result = (double *)double_array(_arg0);    SWIG_MakePtr(_ptemp, (char *) _result,"_double_p");    _resultobj = Py_BuildValue("s",_ptemp);{  if (!_result) {    SWIG_exception(SWIG_MemoryError,"Out of memory.");  }}    return _resultobj;}static PyObject *_wrap_double_destroy(PyObject *self, PyObject *args) {    PyObject * _resultobj;    double * _arg0;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"s:double_destroy",&_argc0))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_double_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of double_destroy. Expected _double_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    double_destroy(_arg0);    Py_INCREF(Py_None);    _resultobj = Py_None;    return _resultobj;}static PyObject *_wrap_double_get(PyObject *self, PyObject *args) {    PyObject * _resultobj;    double  _result;    double * _arg0;    int  _arg1;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"si:double_get",&_argc0,&_arg1))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_double_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of double_get. Expected _double_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    _result = (double )double_get(_arg0,_arg1);    _resultobj = Py_BuildValue("d",_result);    return _resultobj;}static PyObject *_wrap_double_set(PyObject *self, PyObject *args) {    PyObject * _resultobj;    double  _result;    double * _arg0;    int  _arg1;    double  _arg2;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"sid:double_set",&_argc0,&_arg1,&_arg2))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_double_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of double_set. Expected _double_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    _result = (double )double_set(_arg0,_arg1,_arg2);    _resultobj = Py_BuildValue("d",_result);    return _resultobj;}static PyObject *_wrap_float_array(PyObject *self, PyObject *args) {    PyObject * _resultobj;    float * _result;    int  _arg0;    char _ptemp[128];    self = self;    if(!PyArg_ParseTuple(args,"i:float_array",&_arg0))         return NULL;    _result = (float *)float_array(_arg0);    SWIG_MakePtr(_ptemp, (char *) _result,"_float_p");    _resultobj = Py_BuildValue("s",_ptemp);{  if (!_result) {    SWIG_exception(SWIG_MemoryError,"Out of memory.");  }}    return _resultobj;}static PyObject *_wrap_float_destroy(PyObject *self, PyObject *args) {    PyObject * _resultobj;    float * _arg0;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"s:float_destroy",&_argc0))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_float_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of float_destroy. Expected _float_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    float_destroy(_arg0);    Py_INCREF(Py_None);    _resultobj = Py_None;    return _resultobj;}static PyObject *_wrap_float_get(PyObject *self, PyObject *args) {    PyObject * _resultobj;    float  _result;    float * _arg0;    int  _arg1;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"si:float_get",&_argc0,&_arg1))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_float_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of float_get. Expected _float_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    _result = (float )float_get(_arg0,_arg1);    _resultobj = Py_BuildValue("f",_result);    return _resultobj;}static PyObject *_wrap_float_set(PyObject *self, PyObject *args) {    PyObject * _resultobj;    float  _result;    float * _arg0;    int  _arg1;    float  _arg2;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"sif:float_set",&_argc0,&_arg1,&_arg2))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_float_p")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of float_set. Expected _float_p.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    _result = (float )float_set(_arg0,_arg1,_arg2);    _resultobj = Py_BuildValue("f",_result);    return _resultobj;}static PyObject *_wrap_string_array(PyObject *self, PyObject *args) {    PyObject * _resultobj;    char ** _result;    int  _arg0;    char _ptemp[128];    self = self;    if(!PyArg_ParseTuple(args,"i:string_array",&_arg0))         return NULL;    _result = (char **)string_array(_arg0);    SWIG_MakePtr(_ptemp, (char *) _result,"_char_pp");    _resultobj = Py_BuildValue("s",_ptemp);{  if (!_result) {    SWIG_exception(SWIG_MemoryError,"Out of memory.");  }}    return _resultobj;}static PyObject *_wrap_string_destroy(PyObject *self, PyObject *args) {    PyObject * _resultobj;    char ** _arg0;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"s:string_destroy",&_argc0))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_char_pp")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of string_destroy. Expected _char_pp.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    string_destroy(_arg0);    Py_INCREF(Py_None);    _resultobj = Py_None;    return _resultobj;}static PyObject *_wrap_string_get(PyObject *self, PyObject *args) {    PyObject * _resultobj;    char * _result;    char ** _arg0;    int  _arg1;    char * _argc0 = 0;    self = self;    if(!PyArg_ParseTuple(args,"si:string_get",&_argc0,&_arg1))         return NULL;    if (_argc0) {        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_char_pp")) {            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of string_get. Expected _char_pp.");        return NULL;        }    }{  if (!_arg0) {    SWIG_exception(SWIG_ValueError,"Received a NULL Pointer");  }}    _result = (char *)string_get(_arg0,_arg1);    _resultobj = Py_BuildValue("s", _result);    return _resultobj;}static PyObject *_wrap_string_set(PyObject *self, PyObject *args) {    PyObject * _resultobj;

⌨️ 快捷键说明

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