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

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _svmc
else:
    import _svmc

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


__version__ = _svmc.__version__
C_SVC = _svmc.C_SVC
NU_SVC = _svmc.NU_SVC
ONE_CLASS = _svmc.ONE_CLASS
EPSILON_SVR = _svmc.EPSILON_SVR
NU_SVR = _svmc.NU_SVR
LINEAR = _svmc.LINEAR
POLY = _svmc.POLY
RBF = _svmc.RBF
SIGMOID = _svmc.SIGMOID
PRECOMPUTED = _svmc.PRECOMPUTED
class svm_parameter(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    svm_type = property(_svmc.svm_parameter_svm_type_get, _svmc.svm_parameter_svm_type_set)
    kernel_type = property(_svmc.svm_parameter_kernel_type_get, _svmc.svm_parameter_kernel_type_set)
    degree = property(_svmc.svm_parameter_degree_get, _svmc.svm_parameter_degree_set)
    gamma = property(_svmc.svm_parameter_gamma_get, _svmc.svm_parameter_gamma_set)
    coef0 = property(_svmc.svm_parameter_coef0_get, _svmc.svm_parameter_coef0_set)
    cache_size = property(_svmc.svm_parameter_cache_size_get, _svmc.svm_parameter_cache_size_set)
    eps = property(_svmc.svm_parameter_eps_get, _svmc.svm_parameter_eps_set)
    C = property(_svmc.svm_parameter_C_get, _svmc.svm_parameter_C_set)
    nr_weight = property(_svmc.svm_parameter_nr_weight_get, _svmc.svm_parameter_nr_weight_set)
    weight_label = property(_svmc.svm_parameter_weight_label_get, _svmc.svm_parameter_weight_label_set)
    weight = property(_svmc.svm_parameter_weight_get, _svmc.svm_parameter_weight_set)
    nu = property(_svmc.svm_parameter_nu_get, _svmc.svm_parameter_nu_set)
    p = property(_svmc.svm_parameter_p_get, _svmc.svm_parameter_p_set)
    shrinking = property(_svmc.svm_parameter_shrinking_get, _svmc.svm_parameter_shrinking_set)
    probability = property(_svmc.svm_parameter_probability_get, _svmc.svm_parameter_probability_set)

    def __init__(self):
        _svmc.svm_parameter_swiginit(self, _svmc.new_svm_parameter())
    __swig_destroy__ = _svmc.delete_svm_parameter

# Register svm_parameter in _svmc:
_svmc.svm_parameter_swigregister(svm_parameter)

class svm_problem(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    l = property(_svmc.svm_problem_l_get, _svmc.svm_problem_l_set)
    y = property(_svmc.svm_problem_y_get, _svmc.svm_problem_y_set)
    x = property(_svmc.svm_problem_x_get, _svmc.svm_problem_x_set)

    def __init__(self):
        _svmc.svm_problem_swiginit(self, _svmc.new_svm_problem())
    __swig_destroy__ = _svmc.delete_svm_problem

# Register svm_problem in _svmc:
_svmc.svm_problem_swigregister(svm_problem)

class svm_model(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    param = property(_svmc.svm_model_param_get, _svmc.svm_model_param_set)
    nr_class = property(_svmc.svm_model_nr_class_get, _svmc.svm_model_nr_class_set)
    l = property(_svmc.svm_model_l_get, _svmc.svm_model_l_set)
    SV = property(_svmc.svm_model_SV_get, _svmc.svm_model_SV_set)
    sv_coef = property(_svmc.svm_model_sv_coef_get, _svmc.svm_model_sv_coef_set)
    rho = property(_svmc.svm_model_rho_get, _svmc.svm_model_rho_set)
    probA = property(_svmc.svm_model_probA_get, _svmc.svm_model_probA_set)
    probB = property(_svmc.svm_model_probB_get, _svmc.svm_model_probB_set)
    label = property(_svmc.svm_model_label_get, _svmc.svm_model_label_set)
    nSV = property(_svmc.svm_model_nSV_get, _svmc.svm_model_nSV_set)
    free_sv = property(_svmc.svm_model_free_sv_get, _svmc.svm_model_free_sv_set)

    def __init__(self):
        _svmc.svm_model_swiginit(self, _svmc.new_svm_model())
    __swig_destroy__ = _svmc.delete_svm_model

# Register svm_model in _svmc:
_svmc.svm_model_swigregister(svm_model)


def svm_set_verbosity(verbosity_flag):
    return _svmc.svm_set_verbosity(verbosity_flag)

def svm_train(prob, param):
    return _svmc.svm_train(prob, param)

def svm_cross_validation(prob, param, nr_fold, target):
    return _svmc.svm_cross_validation(prob, param, nr_fold, target)

def svm_save_model(model_file_name, model):
    return _svmc.svm_save_model(model_file_name, model)

def svm_load_model(model_file_name):
    return _svmc.svm_load_model(model_file_name)

def svm_get_svm_type(model):
    return _svmc.svm_get_svm_type(model)

def svm_get_nr_class(model):
    return _svmc.svm_get_nr_class(model)

def svm_get_labels(model, label):
    return _svmc.svm_get_labels(model, label)

def svm_get_svr_probability(model):
    return _svmc.svm_get_svr_probability(model)

def svm_predict_values(model, x, decvalue):
    return _svmc.svm_predict_values(model, x, decvalue)

def svm_predict(model, x):
    return _svmc.svm_predict(model, x)

def svm_predict_probability(model, x, prob_estimates):
    return _svmc.svm_predict_probability(model, x, prob_estimates)

def svm_check_parameter(prob, param):
    return _svmc.svm_check_parameter(prob, param)

def svm_check_probability_model(model):
    return _svmc.svm_check_probability_model(model)

def svm_node_matrix2numpy_array(matrix, rows, cols):
    return _svmc.svm_node_matrix2numpy_array(matrix, rows, cols)

def doubleppcarray2numpy_array(data, rows, cols):
    return _svmc.doubleppcarray2numpy_array(data, rows, cols)

def new_int(nelements):
    return _svmc.new_int(nelements)

def delete_int(ary):
    return _svmc.delete_int(ary)

def int_getitem(ary, index):
    return _svmc.int_getitem(ary, index)

def int_setitem(ary, index, value):
    return _svmc.int_setitem(ary, index, value)

def new_double(nelements):
    return _svmc.new_double(nelements)

def delete_double(ary):
    return _svmc.delete_double(ary)

def double_getitem(ary, index):
    return _svmc.double_getitem(ary, index)

def double_setitem(ary, index, value):
    return _svmc.double_setitem(ary, index, value)

def svm_node_array(size):
    return _svmc.svm_node_array(size)

def svm_node_array_set(*args):
    return _svmc.svm_node_array_set(*args)

def svm_node_array_destroy(array):
    return _svmc.svm_node_array_destroy(array)

def svm_node_matrix(size):
    return _svmc.svm_node_matrix(size)

def svm_node_matrix_set(matrix, i, array):
    return _svmc.svm_node_matrix_set(matrix, i, array)

def svm_node_matrix_destroy(matrix):
    return _svmc.svm_node_matrix_destroy(matrix)

def svm_destroy_model_helper(model_ptr):
    return _svmc.svm_destroy_model_helper(model_ptr)


