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

"""otsvm module"""


from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_otsvm')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_otsvm')
    _otsvm = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_otsvm', [dirname(__file__)])
        except ImportError:
            import _otsvm
            return _otsvm
        try:
            _mod = imp.load_module('_otsvm', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _otsvm = swig_import_helper()
    del swig_import_helper
else:
    import _otsvm
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

import openturns.base
import openturns.common
import openturns.typ
import openturns.statistics
import openturns.graph
import openturns.func
import openturns.geom
import openturns.diff
import openturns.optim
import openturns.experiment
import openturns.solver
import openturns.algo
import openturns.uncertainty
import openturns.model_copula
import openturns.randomvector
import openturns.dist_bundle1
import openturns.dist_bundle2
import openturns.weightedexperiment
import openturns.classification
import openturns.orthogonalbasis
import openturns.metamodel
import openturns.transformation
import openturns.analytical
import openturns.simulation
import openturns.stattests
import openturns.model_process
class SVMKernelImplementation(openturns.common.PersistentObject):
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SVMKernelImplementation, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SVMKernelImplementation, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.SVMKernelImplementation_getClassName(self)


    def __repr__(self):
        return _otsvm.SVMKernelImplementation___repr__(self)

    def getParameter(self):
        return _otsvm.SVMKernelImplementation_getParameter(self)

    def setParameter(self, value):
        return _otsvm.SVMKernelImplementation_setParameter(self, value)

    def getParameters(self):
        return _otsvm.SVMKernelImplementation_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.SVMKernelImplementation_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.SVMKernelImplementation___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.SVMKernelImplementation_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.SVMKernelImplementation_partialHessian(self, x1, x2)

    def __init__(self, *args):
        this = _otsvm.new_SVMKernelImplementation(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_SVMKernelImplementation
    __del__ = lambda self: None
SVMKernelImplementation_swigregister = _otsvm.SVMKernelImplementation_swigregister
SVMKernelImplementation_swigregister(SVMKernelImplementation)

class SVMKernelImplementationTypedInterfaceObject(openturns.common.InterfaceObject):
    __swig_setmethods__ = {}
    for _s in [openturns.common.InterfaceObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SVMKernelImplementationTypedInterfaceObject, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.InterfaceObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SVMKernelImplementationTypedInterfaceObject, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _otsvm.new_SVMKernelImplementationTypedInterfaceObject(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def getImplementation(self, *args):
        """
        Accessor to the underlying implementation.

        Returns
        -------
        impl : Implementation
            The implementation class.
        """
        return _otsvm.SVMKernelImplementationTypedInterfaceObject_getImplementation(self, *args)


    def setName(self, name):
        """
        Accessor to the object's name.

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _otsvm.SVMKernelImplementationTypedInterfaceObject_setName(self, name)


    def getName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        name : str
            The name of the object.
        """
        return _otsvm.SVMKernelImplementationTypedInterfaceObject_getName(self)


    def __eq__(self, other):
        return _otsvm.SVMKernelImplementationTypedInterfaceObject___eq__(self, other)

    def __ne__(self, other):
        return _otsvm.SVMKernelImplementationTypedInterfaceObject___ne__(self, other)
    __swig_destroy__ = _otsvm.delete_SVMKernelImplementationTypedInterfaceObject
    __del__ = lambda self: None
SVMKernelImplementationTypedInterfaceObject_swigregister = _otsvm.SVMKernelImplementationTypedInterfaceObject_swigregister
SVMKernelImplementationTypedInterfaceObject_swigregister(SVMKernelImplementationTypedInterfaceObject)

class SVMKernel(SVMKernelImplementationTypedInterfaceObject):
    __swig_setmethods__ = {}
    for _s in [SVMKernelImplementationTypedInterfaceObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SVMKernel, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMKernelImplementationTypedInterfaceObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SVMKernel, name)
    if _newclass:
        GetClassName = staticmethod(_otsvm.SVMKernel_GetClassName)
    else:
        GetClassName = _otsvm.SVMKernel_GetClassName

    def getClassName(self):
        return _otsvm.SVMKernel_getClassName(self)

    def __repr__(self):
        return _otsvm.SVMKernel___repr__(self)

    def __str__(self, *args):
        return _otsvm.SVMKernel___str__(self, *args)

    def getParameter(self):
        return _otsvm.SVMKernel_getParameter(self)

    def setParameter(self, value):
        return _otsvm.SVMKernel_setParameter(self, value)

    def getParameters(self):
        return _otsvm.SVMKernel_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.SVMKernel_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.SVMKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.SVMKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.SVMKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        this = _otsvm.new_SVMKernel(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_SVMKernel
    __del__ = lambda self: None
SVMKernel_swigregister = _otsvm.SVMKernel_swigregister
SVMKernel_swigregister(SVMKernel)

def SVMKernel_GetClassName():
    return _otsvm.SVMKernel_GetClassName()
SVMKernel_GetClassName = _otsvm.SVMKernel_GetClassName

class NormalRBF(SVMKernelImplementation):
    __swig_setmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, NormalRBF, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, NormalRBF, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.NormalRBF_getClassName(self)


    def __repr__(self):
        return _otsvm.NormalRBF___repr__(self)

    def getSigma(self):
        return _otsvm.NormalRBF_getSigma(self)

    def setSigma(self, sigma):
        return _otsvm.NormalRBF_setSigma(self, sigma)

    def getParameter(self):
        return _otsvm.NormalRBF_getParameter(self)

    def setParameter(self, value):
        return _otsvm.NormalRBF_setParameter(self, value)

    def getParameters(self):
        return _otsvm.NormalRBF_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.NormalRBF_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.NormalRBF___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.NormalRBF_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.NormalRBF_partialHessian(self, x1, x2)

    def __init__(self, *args):
        this = _otsvm.new_NormalRBF(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_NormalRBF
    __del__ = lambda self: None
NormalRBF_swigregister = _otsvm.NormalRBF_swigregister
NormalRBF_swigregister(NormalRBF)

class ExponentialRBF(SVMKernelImplementation):
    __swig_setmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ExponentialRBF, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ExponentialRBF, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.ExponentialRBF_getClassName(self)


    def __repr__(self):
        return _otsvm.ExponentialRBF___repr__(self)

    def getSigma(self):
        return _otsvm.ExponentialRBF_getSigma(self)

    def setSigma(self, sigma):
        return _otsvm.ExponentialRBF_setSigma(self, sigma)

    def getParameter(self):
        return _otsvm.ExponentialRBF_getParameter(self)

    def setParameter(self, value):
        return _otsvm.ExponentialRBF_setParameter(self, value)

    def getParameters(self):
        return _otsvm.ExponentialRBF_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.ExponentialRBF_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.ExponentialRBF___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.ExponentialRBF_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.ExponentialRBF_partialHessian(self, x1, x2)

    def __init__(self, *args):
        this = _otsvm.new_ExponentialRBF(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_ExponentialRBF
    __del__ = lambda self: None
ExponentialRBF_swigregister = _otsvm.ExponentialRBF_swigregister
ExponentialRBF_swigregister(ExponentialRBF)

class RationalKernel(SVMKernelImplementation):
    __swig_setmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, RationalKernel, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, RationalKernel, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.RationalKernel_getClassName(self)


    def __repr__(self):
        return _otsvm.RationalKernel___repr__(self)

    def getConstant(self):
        return _otsvm.RationalKernel_getConstant(self)

    def setConstant(self, constant):
        return _otsvm.RationalKernel_setConstant(self, constant)

    def getParameter(self):
        return _otsvm.RationalKernel_getParameter(self)

    def setParameter(self, value):
        return _otsvm.RationalKernel_setParameter(self, value)

    def getParameters(self):
        return _otsvm.RationalKernel_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.RationalKernel_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.RationalKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.RationalKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.RationalKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        this = _otsvm.new_RationalKernel(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_RationalKernel
    __del__ = lambda self: None
RationalKernel_swigregister = _otsvm.RationalKernel_swigregister
RationalKernel_swigregister(RationalKernel)

class PolynomialKernel(SVMKernelImplementation):
    __swig_setmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PolynomialKernel, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, PolynomialKernel, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.PolynomialKernel_getClassName(self)


    def __repr__(self):
        return _otsvm.PolynomialKernel___repr__(self)

    def getDegree(self):
        return _otsvm.PolynomialKernel_getDegree(self)

    def setDegree(self, degree):
        return _otsvm.PolynomialKernel_setDegree(self, degree)

    def getLinear(self):
        return _otsvm.PolynomialKernel_getLinear(self)

    def setLinear(self, linear):
        return _otsvm.PolynomialKernel_setLinear(self, linear)

    def getConstant(self):
        return _otsvm.PolynomialKernel_getConstant(self)

    def setConstant(self, constant):
        return _otsvm.PolynomialKernel_setConstant(self, constant)

    def getParameter(self):
        return _otsvm.PolynomialKernel_getParameter(self)

    def setParameter(self, value):
        return _otsvm.PolynomialKernel_setParameter(self, value)

    def getParameters(self):
        return _otsvm.PolynomialKernel_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.PolynomialKernel_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.PolynomialKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.PolynomialKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.PolynomialKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        this = _otsvm.new_PolynomialKernel(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_PolynomialKernel
    __del__ = lambda self: None
PolynomialKernel_swigregister = _otsvm.PolynomialKernel_swigregister
PolynomialKernel_swigregister(PolynomialKernel)

class SigmoidKernel(SVMKernelImplementation):
    __swig_setmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SigmoidKernel, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SigmoidKernel, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.SigmoidKernel_getClassName(self)


    def __repr__(self):
        return _otsvm.SigmoidKernel___repr__(self)

    def getLinear(self):
        return _otsvm.SigmoidKernel_getLinear(self)

    def setLinear(self, linear):
        return _otsvm.SigmoidKernel_setLinear(self, linear)

    def getConstant(self):
        return _otsvm.SigmoidKernel_getConstant(self)

    def setConstant(self, constant):
        return _otsvm.SigmoidKernel_setConstant(self, constant)

    def getParameters(self):
        return _otsvm.SigmoidKernel_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.SigmoidKernel_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.SigmoidKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.SigmoidKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.SigmoidKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        this = _otsvm.new_SigmoidKernel(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_SigmoidKernel
    __del__ = lambda self: None
SigmoidKernel_swigregister = _otsvm.SigmoidKernel_swigregister
SigmoidKernel_swigregister(SigmoidKernel)

class LinearKernel(SVMKernelImplementation):
    __swig_setmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, LinearKernel, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMKernelImplementation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, LinearKernel, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.LinearKernel_getClassName(self)


    def __repr__(self):
        return _otsvm.LinearKernel___repr__(self)

    def __call__(self, x1, x2):
        return _otsvm.LinearKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.LinearKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.LinearKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        this = _otsvm.new_LinearKernel(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_LinearKernel
    __del__ = lambda self: None
LinearKernel_swigregister = _otsvm.LinearKernel_swigregister
LinearKernel_swigregister(LinearKernel)

class LibSVM(openturns.common.PersistentObject):
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, LibSVM, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, LibSVM, name)
    __repr__ = _swig_repr

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.LibSVM_getClassName(self)

    Linear = _otsvm.LibSVM_Linear
    Polynomial = _otsvm.LibSVM_Polynomial
    Sigmoid = _otsvm.LibSVM_Sigmoid
    NormalRbf = _otsvm.LibSVM_NormalRbf
    CSupportClassification = _otsvm.LibSVM_CSupportClassification
    EpsilonSupportRegression = _otsvm.LibSVM_EpsilonSupportRegression

    def setKernelParameter(self, kernelParameter):
        return _otsvm.LibSVM_setKernelParameter(self, kernelParameter)

    def setTradeoffFactor(self, tradeoffFactor):
        return _otsvm.LibSVM_setTradeoffFactor(self, tradeoffFactor)

    def getNumberSupportVector(self):
        return _otsvm.LibSVM_getNumberSupportVector(self)

    def setModel(self, model):
        return _otsvm.LibSVM_setModel(self, model)

    def getSupportVectorCoef(self):
        return _otsvm.LibSVM_getSupportVectorCoef(self)

    def setEpsilon(self, epsilon):
        return _otsvm.LibSVM_setEpsilon(self, epsilon)

    def setGamma(self, kernel):
        return _otsvm.LibSVM_setGamma(self, kernel)

    def setNu(self, nu):
        return _otsvm.LibSVM_setNu(self, nu)

    def setP(self, p):
        return _otsvm.LibSVM_setP(self, p)

    def getKernelType(self):
        return _otsvm.LibSVM_getKernelType(self)

    def setKernelType(self, kernelType):
        return _otsvm.LibSVM_setKernelType(self, kernelType)

    def setSvmType(self, svmType):
        return _otsvm.LibSVM_setSvmType(self, svmType)

    def getSupportVector(self, dim):
        return _otsvm.LibSVM_getSupportVector(self, dim)

    def getNode(self, index):
        return _otsvm.LibSVM_getNode(self, index)

    def getConstant(self):
        return _otsvm.LibSVM_getConstant(self)

    def getGamma(self):
        return _otsvm.LibSVM_getGamma(self)

    def getDegree(self):
        return _otsvm.LibSVM_getDegree(self)

    def setDegree(self, degree):
        return _otsvm.LibSVM_setDegree(self, degree)

    def getPolynomialConstant(self):
        return _otsvm.LibSVM_getPolynomialConstant(self)

    def getOutput(self, index):
        return _otsvm.LibSVM_getOutput(self, index)

    def performTrain(self):
        return _otsvm.LibSVM_performTrain(self)

    def computeError(self):
        return _otsvm.LibSVM_computeError(self)

    def computeAccuracy(self):
        return _otsvm.LibSVM_computeAccuracy(self)

    def normalize(self, data, transformation, inverseTransformation):
        return _otsvm.LibSVM_normalize(self, data, transformation, inverseTransformation)

    def convertData(self, inputSample, outputSample):
        return _otsvm.LibSVM_convertData(self, inputSample, outputSample)

    def runCrossValidation(self):
        return _otsvm.LibSVM_runCrossValidation(self)

    def destroy(self):
        return _otsvm.LibSVM_destroy(self)

    def destroyModel(self):
        return _otsvm.LibSVM_destroyModel(self)

    def getLabel(self, vector):
        return _otsvm.LibSVM_getLabel(self, vector)

    def getLabelValues(self, vector, outC):
        return _otsvm.LibSVM_getLabelValues(self, vector, outC)

    def predict(self, inP):
        return _otsvm.LibSVM_predict(self, inP)

    def setWeight(self, weight, label):
        return _otsvm.LibSVM_setWeight(self, weight, label)
    if _newclass:
        SVMLog = staticmethod(_otsvm.LibSVM_SVMLog)
    else:
        SVMLog = _otsvm.LibSVM_SVMLog

    def getInputTransformation(self):
        return _otsvm.LibSVM_getInputTransformation(self)

    def __init__(self, *args):
        this = _otsvm.new_LibSVM(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_LibSVM
    __del__ = lambda self: None
LibSVM_swigregister = _otsvm.LibSVM_swigregister
LibSVM_swigregister(LibSVM)

def LibSVM_SVMLog(arg2):
    return _otsvm.LibSVM_SVMLog(arg2)
LibSVM_SVMLog = _otsvm.LibSVM_SVMLog

class SVMRegressionImplementationdInterfaceObject(openturns.common.InterfaceObject):
    __swig_setmethods__ = {}
    for _s in [openturns.common.InterfaceObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SVMRegressionImplementationdInterfaceObject, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.InterfaceObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SVMRegressionImplementationdInterfaceObject, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _otsvm.new_SVMRegressionImplementationdInterfaceObject(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def getImplementation(self, *args):
        """
        Accessor to the underlying implementation.

        Returns
        -------
        impl : Implementation
            The implementation class.
        """
        return _otsvm.SVMRegressionImplementationdInterfaceObject_getImplementation(self, *args)


    def setName(self, name):
        """
        Accessor to the object's name.

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _otsvm.SVMRegressionImplementationdInterfaceObject_setName(self, name)


    def getName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        name : str
            The name of the object.
        """
        return _otsvm.SVMRegressionImplementationdInterfaceObject_getName(self)


    def __eq__(self, other):
        return _otsvm.SVMRegressionImplementationdInterfaceObject___eq__(self, other)

    def __ne__(self, other):
        return _otsvm.SVMRegressionImplementationdInterfaceObject___ne__(self, other)
    __swig_destroy__ = _otsvm.delete_SVMRegressionImplementationdInterfaceObject
    __del__ = lambda self: None
SVMRegressionImplementationdInterfaceObject_swigregister = _otsvm.SVMRegressionImplementationdInterfaceObject_swigregister
SVMRegressionImplementationdInterfaceObject_swigregister(SVMRegressionImplementationdInterfaceObject)

class SVMRegressionImplementation(openturns.common.PersistentObject):
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SVMRegressionImplementation, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SVMRegressionImplementation, name)
    __repr__ = _swig_repr

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.SVMRegressionImplementation_getClassName(self)


    def run(self):
        return _otsvm.SVMRegressionImplementation_run(self)

    def getResult(self):
        return _otsvm.SVMRegressionImplementation_getResult(self)

    def setTradeoffFactor(self, factor):
        return _otsvm.SVMRegressionImplementation_setTradeoffFactor(self, factor)

    def getTradeoffFactor(self):
        return _otsvm.SVMRegressionImplementation_getTradeoffFactor(self)

    def getKernelParameter(self):
        return _otsvm.SVMRegressionImplementation_getKernelParameter(self)

    def setKernelParameter(self, kernel):
        return _otsvm.SVMRegressionImplementation_setKernelParameter(self, kernel)

    def __init__(self, *args):
        this = _otsvm.new_SVMRegressionImplementation(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_SVMRegressionImplementation
    __del__ = lambda self: None
SVMRegressionImplementation_swigregister = _otsvm.SVMRegressionImplementation_swigregister
SVMRegressionImplementation_swigregister(SVMRegressionImplementation)

class SVMRegression(SVMRegressionImplementationdInterfaceObject):
    __swig_setmethods__ = {}
    for _s in [SVMRegressionImplementationdInterfaceObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SVMRegression, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMRegressionImplementationdInterfaceObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SVMRegression, name)
    __repr__ = _swig_repr
    if _newclass:
        GetClassName = staticmethod(_otsvm.SVMRegression_GetClassName)
    else:
        GetClassName = _otsvm.SVMRegression_GetClassName

    def getClassName(self):
        return _otsvm.SVMRegression_getClassName(self)

    def setKernelParameter(self, kernel):
        return _otsvm.SVMRegression_setKernelParameter(self, kernel)

    def getKernelParameter(self):
        return _otsvm.SVMRegression_getKernelParameter(self)

    def setTradeoffFactor(self, factor):
        return _otsvm.SVMRegression_setTradeoffFactor(self, factor)

    def getTradeoffFactor(self):
        return _otsvm.SVMRegression_getTradeoffFactor(self)

    def getResult(self):
        return _otsvm.SVMRegression_getResult(self)

    def run(self):
        return _otsvm.SVMRegression_run(self)

    def __init__(self, *args):
        this = _otsvm.new_SVMRegression(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_SVMRegression
    __del__ = lambda self: None
SVMRegression_swigregister = _otsvm.SVMRegression_swigregister
SVMRegression_swigregister(SVMRegression)

def SVMRegression_GetClassName():
    return _otsvm.SVMRegression_GetClassName()
SVMRegression_GetClassName = _otsvm.SVMRegression_GetClassName

class LibSVMRegression(SVMRegressionImplementation):
    __swig_setmethods__ = {}
    for _s in [SVMRegressionImplementation]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, LibSVMRegression, name, value)
    __swig_getmethods__ = {}
    for _s in [SVMRegressionImplementation]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, LibSVMRegression, name)
    __repr__ = _swig_repr

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.LibSVMRegression_getClassName(self)


    def run(self):
        return _otsvm.LibSVMRegression_run(self)

    def getInputSample(self):
        return _otsvm.LibSVMRegression_getInputSample(self)

    def getOutputSample(self):
        return _otsvm.LibSVMRegression_getOutputSample(self)

    def __init__(self, *args):
        this = _otsvm.new_LibSVMRegression(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_LibSVMRegression
    __del__ = lambda self: None
LibSVMRegression_swigregister = _otsvm.LibSVMRegression_swigregister
LibSVMRegression_swigregister(LibSVMRegression)

class LibSVMClassification(openturns.common.PersistentObject):
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, LibSVMClassification, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, LibSVMClassification, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.LibSVMClassification_getClassName(self)


    def getAccuracy(self):
        return _otsvm.LibSVMClassification_getAccuracy(self)

    def classify(self, vector):
        return _otsvm.LibSVMClassification_classify(self, vector)

    def __repr__(self):
        return _otsvm.LibSVMClassification___repr__(self)

    def grade(self, inP, outC):
        return _otsvm.LibSVMClassification_grade(self, inP, outC)

    def predict(self, inP):
        return _otsvm.LibSVMClassification_predict(self, inP)

    def runKMeans(self, k):
        return _otsvm.LibSVMClassification_runKMeans(self, k)

    def setKernelType(self, kerneltype):
        return _otsvm.LibSVMClassification_setKernelType(self, kerneltype)

    def setTradeoffFactor(self, trade):
        return _otsvm.LibSVMClassification_setTradeoffFactor(self, trade)

    def setKernelParameter(self, kernel):
        return _otsvm.LibSVMClassification_setKernelParameter(self, kernel)

    def setWeight(self, weight):
        return _otsvm.LibSVMClassification_setWeight(self, weight)

    def run(self):
        return _otsvm.LibSVMClassification_run(self)

    def __init__(self, *args):
        this = _otsvm.new_LibSVMClassification(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_LibSVMClassification
    __del__ = lambda self: None
LibSVMClassification_swigregister = _otsvm.LibSVMClassification_swigregister
LibSVMClassification_swigregister(LibSVMClassification)

class KMeansClustering(openturns.common.PersistentObject):
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, KMeansClustering, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, KMeansClustering, name)
    __repr__ = _swig_repr

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.KMeansClustering_getClassName(self)


    def run(self):
        return _otsvm.KMeansClustering_run(self)

    def getCluster(self):
        return _otsvm.KMeansClustering_getCluster(self)

    def getMeans(self):
        return _otsvm.KMeansClustering_getMeans(self)

    def __init__(self, *args):
        this = _otsvm.new_KMeansClustering(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _otsvm.delete_KMeansClustering
    __del__ = lambda self: None
KMeansClustering_swigregister = _otsvm.KMeansClustering_swigregister
KMeansClustering_swigregister(KMeansClustering)

class SVMKernelCollection(_object):
    """
    Collection.

    Examples
    --------
    >>> import openturns as ot

    - Collection of **real values**:

    >>> ot.ScalarCollection(2)
    [0,0]
    >>> ot.ScalarCollection(2, 3.25)
    [3.25,3.25]
    >>> vector = ot.ScalarCollection([2.0, 1.5, 2.6])
    >>> vector
    [2,1.5,2.6]
    >>> vector[1] = 4.2
    >>> vector
    [2,4.2,2.6]
    >>> vector.add(3.8)
    >>> vector
    [2,4.2,2.6,3.8]

    - Collection of **complex values**:

    >>> ot.ComplexCollection(2)
    [(0,0),(0,0)]
    >>> ot.ComplexCollection(2, 3+4j)
    [(3,4),(3,4)]
    >>> vector = ot.ComplexCollection([2+3j, 1-4j, 3.0])
    >>> vector
    [(2,3),(1,-4),(3,0)]
    >>> vector[1] = 4+3j
    >>> vector
    [(2,3),(4,3),(3,0)]
    >>> vector.add(5+1j)
    >>> vector
    [(2,3),(4,3),(3,0),(5,1)]

    - Collection of **booleans**:

    >>> ot.BoolCollection(3)
    [0,0,0]
    >>> ot.BoolCollection(3, 1)
    [1,1,1]
    >>> vector = ot.BoolCollection([0, 1, 0])
    >>> vector
    [0,1,0]
    >>> vector[1] = 0
    >>> vector
    [0,0,0]
    >>> vector.add(1)
    >>> vector
    [0,0,0,1]

    - Collection of **distributions**:

    >>> print(ot.DistributionCollection(2))
    [Uniform(a = -1, b = 1),Uniform(a = -1, b = 1)]
    >>> print(ot.DistributionCollection(2, ot.Gamma(2.75, 1.0)))
    [Gamma(k = 2.75, lambda = 1, gamma = 0),Gamma(k = 2.75, lambda = 1, gamma = 0)]
    >>> vector = ot.DistributionCollection([ot.Normal(), ot.Uniform()])
    >>> print(vector)
    [Normal(mu = 0, sigma = 1),Uniform(a = -1, b = 1)]
    >>> vector[1] = ot.Uniform(-0.5, 1)
    >>> print(vector)
    [Normal(mu = 0, sigma = 1),Uniform(a = -0.5, b = 1)]
    >>> vector.add(ot.Gamma(2.75, 1.0))
    >>> print(vector)
    [Normal(mu = 0, sigma = 1),Uniform(a = -0.5, b = 1),Gamma(k = 2.75, lambda = 1, gamma = 0)]
    """

    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SVMKernelCollection, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SVMKernelCollection, name)
    __swig_destroy__ = _otsvm.delete_SVMKernelCollection
    __del__ = lambda self: None

    def clear(self):
        """
        Reset the collection to zero dimension.

        Examples
        --------
        >>> import openturns as ot
        >>> x = ot.Point(2)
        >>> x.clear()
        >>> x
        class=Point name=Unnamed dimension=0 values=[]
        """
        return _otsvm.SVMKernelCollection_clear(self)


    def __len__(self):
        return _otsvm.SVMKernelCollection___len__(self)

    def __eq__(self, rhs):
        return _otsvm.SVMKernelCollection___eq__(self, rhs)

    def __contains__(self, val):
        return _otsvm.SVMKernelCollection___contains__(self, val)

    def __getitem__(self, i):
        return _otsvm.SVMKernelCollection___getitem__(self, i)

    def __setitem__(self, i, val):
        return _otsvm.SVMKernelCollection___setitem__(self, i, val)

    def __delitem__(self, i):
        return _otsvm.SVMKernelCollection___delitem__(self, i)

    def at(self, *args):
        """
        Access to an element of the collection.

        Parameters
        ----------
        index : positive int
            Position of the element to access.

        Returns
        -------
        element : type depends on the type of the collection
            Element of the collection at the position *index*.
        """
        return _otsvm.SVMKernelCollection_at(self, *args)


    def add(self, *args):
        """
        Append a component (in-place).

        Parameters
        ----------
        value : type depends on the type of the collection.
            The component to append.

        Examples
        --------
        >>> import openturns as ot
        >>> x = ot.Point(2)
        >>> x.add(1.)
        >>> print(x)
        [0,0,1]
        """
        return _otsvm.SVMKernelCollection_add(self, *args)


    def getSize(self):
        """
        Get the collection's dimension (or size).

        Returns
        -------
        n : int
            The number of components in the collection.
        """
        return _otsvm.SVMKernelCollection_getSize(self)


    def resize(self, newSize):
        """
        Change the size of the collection.

        Parameters
        ----------
        newSize : positive int
            New size of the collection.

        Notes
        -----
        If the new size is smaller than the older one, the last elements are thrown
        away, else the new elements are set to the default value of the element type.

        Examples
        --------
        >>> import openturns as ot
        >>> x = ot.Point(2, 4)
        >>> print(x)
        [4,4]
        >>> x.resize(1)
        >>> print(x)
        [4]
        >>> x.resize(4)
        >>> print(x)
        [4,0,0,0]
        """
        return _otsvm.SVMKernelCollection_resize(self, newSize)


    def isEmpty(self):
        """
        Tell if the collection is empty.

        Returns
        -------
        isEmpty : bool
            *True* if there is no element in the collection.

        Examples
        --------
        >>> import openturns as ot
        >>> x = ot.Point(2)
        >>> x.isEmpty()
        False
        >>> x.clear()
        >>> x.isEmpty()
        True
        """
        return _otsvm.SVMKernelCollection_isEmpty(self)


    def __repr__(self):
        return _otsvm.SVMKernelCollection___repr__(self)

    def __str__(self, *args):
        return _otsvm.SVMKernelCollection___str__(self, *args)

    def __init__(self, *args):
        this = _otsvm.new_SVMKernelCollection(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
SVMKernelCollection_swigregister = _otsvm.SVMKernelCollection_swigregister
SVMKernelCollection_swigregister(SVMKernelCollection)

# This file is compatible with both classic and new-style classes.


