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




"""
Approximation algorithms.
"""


from sys import version_info
if 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('_algo', [dirname(__file__)])
        except ImportError:
            import _algo
            return _algo
        if fp is not None:
            try:
                _mod = imp.load_module('_algo', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _algo = swig_import_helper()
    del swig_import_helper
else:
    import _algo
del version_info
try:
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
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):
        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(name)

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

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0


class SwigPyIterator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _algo.delete_SwigPyIterator
    __del__ = lambda self : None;
    def value(self): return _algo.SwigPyIterator_value(self)
    def incr(self, n=1): return _algo.SwigPyIterator_incr(self, n)
    def decr(self, n=1): return _algo.SwigPyIterator_decr(self, n)
    def distance(self, *args): return _algo.SwigPyIterator_distance(self, *args)
    def equal(self, *args): return _algo.SwigPyIterator_equal(self, *args)
    def copy(self): return _algo.SwigPyIterator_copy(self)
    def next(self): return _algo.SwigPyIterator_next(self)
    def __next__(self): return _algo.SwigPyIterator___next__(self)
    def previous(self): return _algo.SwigPyIterator_previous(self)
    def advance(self, *args): return _algo.SwigPyIterator_advance(self, *args)
    def __eq__(self, *args): return _algo.SwigPyIterator___eq__(self, *args)
    def __ne__(self, *args): return _algo.SwigPyIterator___ne__(self, *args)
    def __iadd__(self, *args): return _algo.SwigPyIterator___iadd__(self, *args)
    def __isub__(self, *args): return _algo.SwigPyIterator___isub__(self, *args)
    def __add__(self, *args): return _algo.SwigPyIterator___add__(self, *args)
    def __sub__(self, *args): return _algo.SwigPyIterator___sub__(self, *args)
    def __iter__(self): return self
SwigPyIterator_swigregister = _algo.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

GCC_VERSION = _algo.GCC_VERSION
class TestFailed:
    """TestFailed is used to raise an uniform exception in tests."""

    __type = "TestFailed"

    def __init__(self, reason=""):
        self.reason = reason

    def type(self):
        return TestFailed.__type

    def what(self):
        return self.reason

    def __str__(self):
        return TestFailed.__type + ": " + self.reason

    def __lshift__(self, ch):
        self.reason += ch
        return self

import openturns.common
import openturns.typ
import openturns.func
import openturns.geom
import openturns.graph
import openturns.statistics
class ApproximationAlgorithmImplementation(openturns.common.PersistentObject):
    """
    Approximation algorithm.

    See also
    --------
    LeastSquaresStrategy, ApproximationAlgorithmImplementationFactory,
    LeastSquaresMetaModelSelectionFactory

    Notes
    -----
    The ApproximationAlgorithm is built from an approximation algorithm
    implementation factory which is a
    :class:`~openturns.ApproximationAlgorithmImplementationFactory` or a
    :class:`~openturns.LeastSquaresMetaModelSelectionFactory`.

    This class is not usable because it has sense only whithin the
    :class:`~openturns.FunctionalChaosAlgorithm`.
    """
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ApproximationAlgorithmImplementation, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, ApproximationAlgorithmImplementation, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def getX(self):
        """
        Accessor to the input sample.

        Returns
        -------
        x : :class:`~openturns.NumericalSample`
            Input sample
        """
        return _algo.ApproximationAlgorithmImplementation_getX(self)

    def getY(self):
        """
        Accessor to the output sample.

        Returns
        -------
        y : :class:`~openturns.NumericalSample`
            Input sample
        """
        return _algo.ApproximationAlgorithmImplementation_getY(self)

    def getWeight(self):
        """
        Accessor to the weights.

        Returns
        -------
        weight : :class:`~openturns.NumericalPoint`
            Output weights
        """
        return _algo.ApproximationAlgorithmImplementation_getWeight(self)

    def getPsi(self):
        """
        Accessor to the basis.

        Returns
        -------
        coefficients : :class:`~openturns.Basis`
            The basis
        """
        return _algo.ApproximationAlgorithmImplementation_getPsi(self)

    def __repr__(self): return _algo.ApproximationAlgorithmImplementation___repr__(self)
    def __str__(self, offset=""): return _algo.ApproximationAlgorithmImplementation___str__(self, offset)
    def run(self):
        """Run the algorithm."""
        return _algo.ApproximationAlgorithmImplementation_run(self)

    def getCoefficients(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        coefficients : :class:`~openturns.NumericalPoint`
            The coefficients
        """
        return _algo.ApproximationAlgorithmImplementation_getCoefficients(self)

    def getResidual(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        coefficients : float
            The residual
        """
        return _algo.ApproximationAlgorithmImplementation_getResidual(self)

    def getRelativeError(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        relativeError : float
            The relative error
        """
        return _algo.ApproximationAlgorithmImplementation_getRelativeError(self)

    def setVerbose(self, *args):
        """
        Accessor to the verbosity flag.

        Parameters
        ----------
        v : bool
            Enable or disable the verbosity.
        """
        return _algo.ApproximationAlgorithmImplementation_setVerbose(self, *args)

    def getVerbose(self):
        """
        Accessor to the verbosity flag.

        Returns
        -------
        v : bool.
            Verbosity
        """
        return _algo.ApproximationAlgorithmImplementation_getVerbose(self)

    def __init__(self, *args): 
        this = _algo.new_ApproximationAlgorithmImplementation(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_ApproximationAlgorithmImplementation
    __del__ = lambda self : None;
ApproximationAlgorithmImplementation_swigregister = _algo.ApproximationAlgorithmImplementation_swigregister
ApproximationAlgorithmImplementation_swigregister(ApproximationAlgorithmImplementation)

class ApproximationAlgorithmImplementationTypedInterfaceObject(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, ApproximationAlgorithmImplementationTypedInterfaceObject, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.InterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, ApproximationAlgorithmImplementationTypedInterfaceObject, name)
    __repr__ = _swig_repr
    def __init__(self, *args): 
        this = _algo.new_ApproximationAlgorithmImplementationTypedInterfaceObject(*args)
        try: self.this.append(this)
        except: self.this = this
    def getImplementation(self, *args):
        """
        Accessor to the underlying implementation.

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

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

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _algo.ApproximationAlgorithmImplementationTypedInterfaceObject_setName(self, *args)

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

        Returns
        -------
        name : str
            The name of the object.
        """
        return _algo.ApproximationAlgorithmImplementationTypedInterfaceObject_getName(self)

    def __eq__(self, *args): return _algo.ApproximationAlgorithmImplementationTypedInterfaceObject___eq__(self, *args)
    __swig_destroy__ = _algo.delete_ApproximationAlgorithmImplementationTypedInterfaceObject
    __del__ = lambda self : None;
ApproximationAlgorithmImplementationTypedInterfaceObject_swigregister = _algo.ApproximationAlgorithmImplementationTypedInterfaceObject_swigregister
ApproximationAlgorithmImplementationTypedInterfaceObject_swigregister(ApproximationAlgorithmImplementationTypedInterfaceObject)

class ApproximationAlgorithm(ApproximationAlgorithmImplementationTypedInterfaceObject):
    """
    Approximation algorithm.

    See also
    --------
    LeastSquaresStrategy, ApproximationAlgorithmImplementationFactory,
    LeastSquaresMetaModelSelectionFactory

    Notes
    -----
    The ApproximationAlgorithm is built from an approximation algorithm
    implementation factory which is a
    :class:`~openturns.ApproximationAlgorithmImplementationFactory` or a
    :class:`~openturns.LeastSquaresMetaModelSelectionFactory`.

    This class is not usable because it has sense only whithin the
    :class:`~openturns.FunctionalChaosAlgorithm`.
    """
    __swig_setmethods__ = {}
    for _s in [ApproximationAlgorithmImplementationTypedInterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ApproximationAlgorithm, name, value)
    __swig_getmethods__ = {}
    for _s in [ApproximationAlgorithmImplementationTypedInterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, ApproximationAlgorithm, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def getX(self):
        """
        Accessor to the input sample.

        Returns
        -------
        x : :class:`~openturns.NumericalSample`
            Input sample
        """
        return _algo.ApproximationAlgorithm_getX(self)

    def getY(self):
        """
        Accessor to the output sample.

        Returns
        -------
        y : :class:`~openturns.NumericalSample`
            Input sample
        """
        return _algo.ApproximationAlgorithm_getY(self)

    def getWeight(self):
        """
        Accessor to the weights.

        Returns
        -------
        weight : :class:`~openturns.NumericalPoint`
            Output weights
        """
        return _algo.ApproximationAlgorithm_getWeight(self)

    def getPsi(self):
        """
        Accessor to the basis.

        Returns
        -------
        coefficients : :class:`~openturns.Basis`
            The basis
        """
        return _algo.ApproximationAlgorithm_getPsi(self)

    def setVerbose(self, *args):
        """
        Accessor to the verbosity flag.

        Parameters
        ----------
        v : bool
            Enable or disable the verbosity.
        """
        return _algo.ApproximationAlgorithm_setVerbose(self, *args)

    def getVerbose(self):
        """
        Accessor to the verbosity flag.

        Returns
        -------
        v : bool.
            Verbosity
        """
        return _algo.ApproximationAlgorithm_getVerbose(self)

    def __repr__(self): return _algo.ApproximationAlgorithm___repr__(self)
    def __str__(self, offset=""): return _algo.ApproximationAlgorithm___str__(self, offset)
    def run(self):
        """Run the algorithm."""
        return _algo.ApproximationAlgorithm_run(self)

    def getCoefficients(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        coefficients : :class:`~openturns.NumericalPoint`
            The coefficients
        """
        return _algo.ApproximationAlgorithm_getCoefficients(self)

    def getResidual(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        coefficients : float
            The residual
        """
        return _algo.ApproximationAlgorithm_getResidual(self)

    def getRelativeError(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        relativeError : float
            The relative error
        """
        return _algo.ApproximationAlgorithm_getRelativeError(self)

    def __init__(self, *args): 
        this = _algo.new_ApproximationAlgorithm(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_ApproximationAlgorithm
    __del__ = lambda self : None;
ApproximationAlgorithm_swigregister = _algo.ApproximationAlgorithm_swigregister
ApproximationAlgorithm_swigregister(ApproximationAlgorithm)

class ApproximationAlgorithmImplementationFactory(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, ApproximationAlgorithmImplementationFactory, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, ApproximationAlgorithmImplementationFactory, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def build(self, *args): return _algo.ApproximationAlgorithmImplementationFactory_build(self, *args)
    def __repr__(self): return _algo.ApproximationAlgorithmImplementationFactory___repr__(self)
    def __init__(self, *args): 
        this = _algo.new_ApproximationAlgorithmImplementationFactory(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_ApproximationAlgorithmImplementationFactory
    __del__ = lambda self : None;
ApproximationAlgorithmImplementationFactory_swigregister = _algo.ApproximationAlgorithmImplementationFactory_swigregister
ApproximationAlgorithmImplementationFactory_swigregister(ApproximationAlgorithmImplementationFactory)

class ClassifierImplementation(openturns.common.PersistentObject):
    """
    Classifier.

    Available constructors:
        Classifier(*classifierImp*)

    Parameters
    ----------
    classifierImp : classifier implementation
        A classifier implementation. It can be a :class:`~openturns.MixtureClassifier`.

    See also
    --------
    MixtureClassifier, ExpertMixture

    Notes
    -----
    The classifier enables to define rules that assign a vector to a particular
    class.
    """
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ClassifierImplementation, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, ClassifierImplementation, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def classify(self, *args):
        """
        Classify points according to the classifier.

        **Available usages**:

            classify(*inputPoint*)

            classify(*inputSample*)

        Parameters
        ----------
        inputPoint : sequence of float
            A point to classify.
        inputSample : 2-d a sequence of float
            A set of point to classify.

        Notes
        -----
        The rules to assign a point to a class are specific to each *classifierImp*.

        In the first usage, it returns an integer which corresponds to the class where
        *inputPoint* has been assigned.

        In the second usage, it returns an :class:`~openturns.Indices` that collects the
        class of each point of *inputSample*.
        """
        return _algo.ClassifierImplementation_classify(self, *args)

    def grade(self, *args):
        """
        Grade points according to the classifier.

        **Available usages**:

            grade(*inputPoint, k*)

            grade(*inputSample, classList*)

        Parameters
        ----------
        inputPoint : sequence of float
            A point to grade.
        inputSample : 2-d a sequence of float
            A set of point to grade.
        k : integer
            The class number.
        classList : sequence of integer
            The list of class number.

        Notes
        -----
        The rules to grade a point with respect to a class are specific to each
        *classifierImp*.

        In the first usage, it returns a real that grades *inputPoint* with respect to
        the class *k*. The greatest, the best.

        In the second usage, it returns an :class:`~openturns.Indices` that collects the
        grades of the :math:`i^{th}` point of *inputSample* with respect to the
        :math:`i^{th}` class of *classList*.
        """
        return _algo.ClassifierImplementation_grade(self, *args)

    def __repr__(self): return _algo.ClassifierImplementation___repr__(self)
    def __str__(self, offset=""): return _algo.ClassifierImplementation___str__(self, offset)
    def setVerbose(self, *args):
        """
        Accessor to the verbosity.

        Parameters
        ----------
        verb : bool
            Logical value telling if the verbose mode has been activated.
        """
        return _algo.ClassifierImplementation_setVerbose(self, *args)

    def getVerbose(self):
        """
        Accessor to the verbosity.

        Returns
        -------
        verb : bool
            Logical value telling if the verbose mode has been activated.
        """
        return _algo.ClassifierImplementation_getVerbose(self)

    def getDimension(self):
        """
        Accessor to the dimension.

        Returns
        -------
        dim : integer
            The dimension of the classifier.
        """
        return _algo.ClassifierImplementation_getDimension(self)

    def __init__(self, *args): 
        this = _algo.new_ClassifierImplementation(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_ClassifierImplementation
    __del__ = lambda self : None;
ClassifierImplementation_swigregister = _algo.ClassifierImplementation_swigregister
ClassifierImplementation_swigregister(ClassifierImplementation)

class ClassifierImplementationTypedInterfaceObject(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, ClassifierImplementationTypedInterfaceObject, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.InterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, ClassifierImplementationTypedInterfaceObject, name)
    __repr__ = _swig_repr
    def __init__(self, *args): 
        this = _algo.new_ClassifierImplementationTypedInterfaceObject(*args)
        try: self.this.append(this)
        except: self.this = this
    def getImplementation(self, *args):
        """
        Accessor to the underlying implementation.

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

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

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _algo.ClassifierImplementationTypedInterfaceObject_setName(self, *args)

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

        Returns
        -------
        name : str
            The name of the object.
        """
        return _algo.ClassifierImplementationTypedInterfaceObject_getName(self)

    def __eq__(self, *args): return _algo.ClassifierImplementationTypedInterfaceObject___eq__(self, *args)
    __swig_destroy__ = _algo.delete_ClassifierImplementationTypedInterfaceObject
    __del__ = lambda self : None;
ClassifierImplementationTypedInterfaceObject_swigregister = _algo.ClassifierImplementationTypedInterfaceObject_swigregister
ClassifierImplementationTypedInterfaceObject_swigregister(ClassifierImplementationTypedInterfaceObject)

class Classifier(ClassifierImplementationTypedInterfaceObject):
    """
    Classifier.

    Available constructors:
        Classifier(*classifierImp*)

    Parameters
    ----------
    classifierImp : classifier implementation
        A classifier implementation. It can be a :class:`~openturns.MixtureClassifier`.

    See also
    --------
    MixtureClassifier, ExpertMixture

    Notes
    -----
    The classifier enables to define rules that assign a vector to a particular
    class.
    """
    __swig_setmethods__ = {}
    for _s in [ClassifierImplementationTypedInterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Classifier, name, value)
    __swig_getmethods__ = {}
    for _s in [ClassifierImplementationTypedInterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, Classifier, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def classify(self, *args):
        """
        Classify points according to the classifier.

        **Available usages**:

            classify(*inputPoint*)

            classify(*inputSample*)

        Parameters
        ----------
        inputPoint : sequence of float
            A point to classify.
        inputSample : 2-d a sequence of float
            A set of point to classify.

        Notes
        -----
        The rules to assign a point to a class are specific to each *classifierImp*.

        In the first usage, it returns an integer which corresponds to the class where
        *inputPoint* has been assigned.

        In the second usage, it returns an :class:`~openturns.Indices` that collects the
        class of each point of *inputSample*.
        """
        return _algo.Classifier_classify(self, *args)

    def grade(self, *args):
        """
        Grade points according to the classifier.

        **Available usages**:

            grade(*inputPoint, k*)

            grade(*inputSample, classList*)

        Parameters
        ----------
        inputPoint : sequence of float
            A point to grade.
        inputSample : 2-d a sequence of float
            A set of point to grade.
        k : integer
            The class number.
        classList : sequence of integer
            The list of class number.

        Notes
        -----
        The rules to grade a point with respect to a class are specific to each
        *classifierImp*.

        In the first usage, it returns a real that grades *inputPoint* with respect to
        the class *k*. The greatest, the best.

        In the second usage, it returns an :class:`~openturns.Indices` that collects the
        grades of the :math:`i^{th}` point of *inputSample* with respect to the
        :math:`i^{th}` class of *classList*.
        """
        return _algo.Classifier_grade(self, *args)

    def getDimension(self):
        """
        Accessor to the dimension.

        Returns
        -------
        dim : integer
            The dimension of the classifier.
        """
        return _algo.Classifier_getDimension(self)

    def setVerbose(self, *args):
        """
        Accessor to the verbosity.

        Parameters
        ----------
        verb : bool
            Logical value telling if the verbose mode has been activated.
        """
        return _algo.Classifier_setVerbose(self, *args)

    def getVerbose(self):
        """
        Accessor to the verbosity.

        Returns
        -------
        verb : bool
            Logical value telling if the verbose mode has been activated.
        """
        return _algo.Classifier_getVerbose(self)

    def __repr__(self): return _algo.Classifier___repr__(self)
    def __str__(self, offset=""): return _algo.Classifier___str__(self, offset)
    def __init__(self, *args): 
        this = _algo.new_Classifier(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_Classifier
    __del__ = lambda self : None;
Classifier_swigregister = _algo.Classifier_swigregister
Classifier_swigregister(Classifier)

class FittingAlgorithmImplementation(openturns.common.PersistentObject):
    """
    Fitting algorithm.

    Available constructors:
        FittingAlgorithm(*fittingAlgoImp*)

    Parameters
    ----------
    fittingAlgoImp : a FittingAlgorithmImplementation
        A fitting algorithm implementation which is the
        :class:`~openturns.CorrectedLeaveOneOut` or :class:`~openturns.KFold`.

    See also
    --------
    CorrectedLeaveOneOut, KFold

    Notes
    -----
    FittingAlgorithm is the interface of the FittingAlgorithmImplementation.
    This class is not usable because it has sense only whithin the
    :class:`~openturns.FunctionalChaosAlgorithm`.
    """
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, FittingAlgorithmImplementation, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, FittingAlgorithmImplementation, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def __repr__(self): return _algo.FittingAlgorithmImplementation___repr__(self)
    def run(self, *args): return _algo.FittingAlgorithmImplementation_run(self, *args)
    def __init__(self, *args): 
        this = _algo.new_FittingAlgorithmImplementation(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_FittingAlgorithmImplementation
    __del__ = lambda self : None;
FittingAlgorithmImplementation_swigregister = _algo.FittingAlgorithmImplementation_swigregister
FittingAlgorithmImplementation_swigregister(FittingAlgorithmImplementation)

class FittingAlgorithmImplementationTypedInterfaceObject(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, FittingAlgorithmImplementationTypedInterfaceObject, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.InterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, FittingAlgorithmImplementationTypedInterfaceObject, name)
    __repr__ = _swig_repr
    def __init__(self, *args): 
        this = _algo.new_FittingAlgorithmImplementationTypedInterfaceObject(*args)
        try: self.this.append(this)
        except: self.this = this
    def getImplementation(self, *args):
        """
        Accessor to the underlying implementation.

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

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

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _algo.FittingAlgorithmImplementationTypedInterfaceObject_setName(self, *args)

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

        Returns
        -------
        name : str
            The name of the object.
        """
        return _algo.FittingAlgorithmImplementationTypedInterfaceObject_getName(self)

    def __eq__(self, *args): return _algo.FittingAlgorithmImplementationTypedInterfaceObject___eq__(self, *args)
    __swig_destroy__ = _algo.delete_FittingAlgorithmImplementationTypedInterfaceObject
    __del__ = lambda self : None;
FittingAlgorithmImplementationTypedInterfaceObject_swigregister = _algo.FittingAlgorithmImplementationTypedInterfaceObject_swigregister
FittingAlgorithmImplementationTypedInterfaceObject_swigregister(FittingAlgorithmImplementationTypedInterfaceObject)

class FittingAlgorithm(FittingAlgorithmImplementationTypedInterfaceObject):
    """
    Fitting algorithm.

    Available constructors:
        FittingAlgorithm(*fittingAlgoImp*)

    Parameters
    ----------
    fittingAlgoImp : a FittingAlgorithmImplementation
        A fitting algorithm implementation which is the
        :class:`~openturns.CorrectedLeaveOneOut` or :class:`~openturns.KFold`.

    See also
    --------
    CorrectedLeaveOneOut, KFold

    Notes
    -----
    FittingAlgorithm is the interface of the FittingAlgorithmImplementation.
    This class is not usable because it has sense only whithin the
    :class:`~openturns.FunctionalChaosAlgorithm`.
    """
    __swig_setmethods__ = {}
    for _s in [FittingAlgorithmImplementationTypedInterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, FittingAlgorithm, name, value)
    __swig_getmethods__ = {}
    for _s in [FittingAlgorithmImplementationTypedInterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, FittingAlgorithm, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def __repr__(self): return _algo.FittingAlgorithm___repr__(self)
    def __str__(self, offset=""): return _algo.FittingAlgorithm___str__(self, offset)
    def run(self, *args): return _algo.FittingAlgorithm_run(self, *args)
    def __init__(self, *args): 
        this = _algo.new_FittingAlgorithm(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_FittingAlgorithm
    __del__ = lambda self : None;
FittingAlgorithm_swigregister = _algo.FittingAlgorithm_swigregister
FittingAlgorithm_swigregister(FittingAlgorithm)

class KDTree(openturns.common.Object):
    __swig_setmethods__ = {}
    for _s in [openturns.common.Object]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, KDTree, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.Object]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, KDTree, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def __repr__(self): return _algo.KDTree___repr__(self)
    def isEmpty(self): return _algo.KDTree_isEmpty(self)
    def insert(self, *args): return _algo.KDTree_insert(self, *args)
    def getNearestNeighboursIndices(self, *args): return _algo.KDTree_getNearestNeighboursIndices(self, *args)
    def getNearestNeighbours(self, *args): return _algo.KDTree_getNearestNeighbours(self, *args)
    def getNearestNeighbourIndex(self, *args): return _algo.KDTree_getNearestNeighbourIndex(self, *args)
    def getNearestNeighbour(self, *args): return _algo.KDTree_getNearestNeighbour(self, *args)
    def getPoints(self): return _algo.KDTree_getPoints(self)
    def __init__(self, *args): 
        this = _algo.new_KDTree(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_KDTree
    __del__ = lambda self : None;
KDTree_swigregister = _algo.KDTree_swigregister
KDTree_swigregister(KDTree)

class KFold(FittingAlgorithmImplementation):
    """
    K-fold.

    Available constructors:
        KFold()

        KFold(*k*)

    Parameters
    ----------
    k : positive integer
        Number of folds in which the sample is splitted. If not provided, default is
        :math:`k = 10`.

    See also
    --------
    FittingAlgorithm, CorrectedLeaveOneOut

    Notes
    -----
    KFold inherits from :class:`~openturns.FittingAlgorithm`.

    This class is not usable because it has sense only whithin the
    :class:`~openturns.FunctionalChaosAlgorithm`.
    """
    __swig_setmethods__ = {}
    for _s in [FittingAlgorithmImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, KFold, name, value)
    __swig_getmethods__ = {}
    for _s in [FittingAlgorithmImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, KFold, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def __repr__(self): return _algo.KFold___repr__(self)
    def run(self, *args): return _algo.KFold_run(self, *args)
    def setK(self, *args):
        """
        Accessor to the number of folds.

        Parameters
        ----------
        k : integer
            Number of folds in which the sample is splitted.
        """
        return _algo.KFold_setK(self, *args)

    def getK(self):
        """
        Accessor to the number of folds.

        Returns
        -------
        k : integer
            Number of folds in which the sample is splitted.
        """
        return _algo.KFold_getK(self)

    def __init__(self, *args): 
        this = _algo.new_KFold(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_KFold
    __del__ = lambda self : None;
KFold_swigregister = _algo.KFold_swigregister
KFold_swigregister(KFold)

class CorrectedLeaveOneOut(FittingAlgorithmImplementation):
    """
    Corrected leave one out.

    Available constructors:
        CorrectedLeaveOneOut()

    See also
    --------
    FittingAlgorithm, KFold

    Notes
    -----
    CorrectedLeaveOneOut inherits from :class:`~openturns.FittingAlgorithm`.

    This class is not usable because it has sense only whithin the
    :class:`~openturns.FunctionalChaosAlgorithm`.
    """
    __swig_setmethods__ = {}
    for _s in [FittingAlgorithmImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, CorrectedLeaveOneOut, name, value)
    __swig_getmethods__ = {}
    for _s in [FittingAlgorithmImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, CorrectedLeaveOneOut, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def __repr__(self): return _algo.CorrectedLeaveOneOut___repr__(self)
    def run(self, *args): return _algo.CorrectedLeaveOneOut_run(self, *args)
    def __init__(self, *args): 
        this = _algo.new_CorrectedLeaveOneOut(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_CorrectedLeaveOneOut
    __del__ = lambda self : None;
CorrectedLeaveOneOut_swigregister = _algo.CorrectedLeaveOneOut_swigregister
CorrectedLeaveOneOut_swigregister(CorrectedLeaveOneOut)

class LeastSquaresMetaModelSelection(ApproximationAlgorithmImplementation):
    """
    Least squares metamodel selection factory.

    See also
    --------
    ApproximationAlgorithm, PenalizedLeastSquaresAlgorithm

    Notes
    -----
    The LeastSquaresMetaModelSelection is built from a least squares metamodel
    selection factory.
    """
    __swig_setmethods__ = {}
    for _s in [ApproximationAlgorithmImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, LeastSquaresMetaModelSelection, name, value)
    __swig_getmethods__ = {}
    for _s in [ApproximationAlgorithmImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, LeastSquaresMetaModelSelection, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def __repr__(self): return _algo.LeastSquaresMetaModelSelection___repr__(self)
    def setBasisSequenceFactory(self, *args): return _algo.LeastSquaresMetaModelSelection_setBasisSequenceFactory(self, *args)
    def getBasisSequenceFactory(self): return _algo.LeastSquaresMetaModelSelection_getBasisSequenceFactory(self)
    def setFittingAlgorithm(self, *args): return _algo.LeastSquaresMetaModelSelection_setFittingAlgorithm(self, *args)
    def getFittingAlgorithm(self): return _algo.LeastSquaresMetaModelSelection_getFittingAlgorithm(self)
    def run(self):
        """Run the algorithm."""
        return _algo.LeastSquaresMetaModelSelection_run(self)

    def __init__(self, *args): 
        this = _algo.new_LeastSquaresMetaModelSelection(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_LeastSquaresMetaModelSelection
    __del__ = lambda self : None;
LeastSquaresMetaModelSelection_swigregister = _algo.LeastSquaresMetaModelSelection_swigregister
LeastSquaresMetaModelSelection_swigregister(LeastSquaresMetaModelSelection)

class LeastSquaresMetaModelSelectionFactory(ApproximationAlgorithmImplementationFactory):
    """
    Least squares metamodel selection factory.

    Available constructors:
        LeastSquaresMetaModelSelectionFactory()

        LeastSquaresMetaModelSelectionFactory(*basisSeqFac*)

        LeastSquaresMetaModelSelectionFactory(*basisSeqFac, fittingAlgo*)

    Parameters
    ----------
    basisSeqFac : :class:`~openturns.BasisSequenceFactory`
        A basis sequence factory.
    fittingAlgo : :class:`~openturns.FittingAlgorithm`
        A fitting algorithm.

    See also
    --------
    ApproximationAlgorithm, PenalizedLeastSquaresAlgorithmFactory

    Notes
    -----
    Implementation of an approximation algorithm implementation factory which builds
    an :class:`~openturns.ApproximationAlgorithm`.

    This class is not usable because it has sense only whithin the
    :class:`~openturns.FunctionalChaosAlgorithm`.

    Examples
    --------
    >>> import openturns as ot
    >>> basisSequenceFactory = ot.LARS()
    >>> fittingAlgorithm = ot.CorrectedLeaveOneOut()
    >>> approximationAlgorithm = ot.LeastSquaresMetaModelSelectionFactory(
    ...                                     basisSequenceFactory, fittingAlgorithm)
    """
    __swig_setmethods__ = {}
    for _s in [ApproximationAlgorithmImplementationFactory]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, LeastSquaresMetaModelSelectionFactory, name, value)
    __swig_getmethods__ = {}
    for _s in [ApproximationAlgorithmImplementationFactory]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, LeastSquaresMetaModelSelectionFactory, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def getBasisSequenceFactory(self):
        """
        Accessor to the basis sequence factory.

        Returns
        -------
        basis : :class:`~openturns.BasisSequenceFactory`
            Basis sequence factory.
        """
        return _algo.LeastSquaresMetaModelSelectionFactory_getBasisSequenceFactory(self)

    def getFittingAlgorithm(self):
        """
        Accessor to the fitting algorithm.

        Returns
        -------
        algo : :class:`~openturns.FittingAlgorithm`
            Fitting algorithm.
        """
        return _algo.LeastSquaresMetaModelSelectionFactory_getFittingAlgorithm(self)

    def build(self, *args): return _algo.LeastSquaresMetaModelSelectionFactory_build(self, *args)
    def __repr__(self): return _algo.LeastSquaresMetaModelSelectionFactory___repr__(self)
    def __init__(self, *args): 
        this = _algo.new_LeastSquaresMetaModelSelectionFactory(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_LeastSquaresMetaModelSelectionFactory
    __del__ = lambda self : None;
LeastSquaresMetaModelSelectionFactory_swigregister = _algo.LeastSquaresMetaModelSelectionFactory_swigregister
LeastSquaresMetaModelSelectionFactory_swigregister(LeastSquaresMetaModelSelectionFactory)

class PenalizedLeastSquaresAlgorithm(ApproximationAlgorithmImplementation):
    """
    Penalized least squares algorithm.

    Available constructors:
        PenalizedLeastSquaresAlgorithm(*x, y, psi, indices, penalizationFactor=0, useNormal=False*)

        PenalizedLeastSquaresAlgorithm(*x, y, weight, psi, indices, penalizationFactor=0, useNormal=False*)

        PenalizedLeastSquaresAlgorithm(*x, y, weight, psi, indices, penalizationFactor=0, penalizationMatrix, useNormal=False*)

    Parameters
    ----------
    x : :class:`~openturns.NumericalSample`
        Input sample
    y : :class:`~openturns.NumericalSample`
        Output sample
    weight : sequence of float
        Output weights
    psi : :class:`~openturns.Basis`
        Functional basis
    indices : sequence of int
        Indices allowed in the basis
    penalizationFactor : float, optional
        Penalization factor
    penalizationMatrix : 2-d sequence of float
        Penalization matrix
    useNormal : bool, optional
        Solve the normal equation

    See also
    --------
    ApproximationAlgorithm, LeastSquaresMetaModelSelection

    Notes
    -----
    Solve the least-squares problem:

    .. math::

        \\vect{a} = \\argmin_{\\vect{b} \\in \\Rset^P} ||y - \\vect{b}^{\\intercal} \\vect{\\Psi}(\\vect{U})||^2

    """
    __swig_setmethods__ = {}
    for _s in [ApproximationAlgorithmImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PenalizedLeastSquaresAlgorithm, name, value)
    __swig_getmethods__ = {}
    for _s in [ApproximationAlgorithmImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, PenalizedLeastSquaresAlgorithm, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def __repr__(self): return _algo.PenalizedLeastSquaresAlgorithm___repr__(self)
    def run(self):
        """Run the algorithm."""
        return _algo.PenalizedLeastSquaresAlgorithm_run(self)

    def __init__(self, *args): 
        this = _algo.new_PenalizedLeastSquaresAlgorithm(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_PenalizedLeastSquaresAlgorithm
    __del__ = lambda self : None;
PenalizedLeastSquaresAlgorithm_swigregister = _algo.PenalizedLeastSquaresAlgorithm_swigregister
PenalizedLeastSquaresAlgorithm_swigregister(PenalizedLeastSquaresAlgorithm)

class PenalizedLeastSquaresAlgorithmFactory(ApproximationAlgorithmImplementationFactory):
    """
    Penalized least squares algorithm factory.

    Available constructors:
        PenalizedLeastSquaresAlgorithmFactory()

    See also
    --------
    ApproximationAlgorithm, LeastSquaresMetaModelSelectionFactory

    Notes
    -----
    Implementation of an approximation algorithm implementation factory which builds
    an :class:`~openturns.ApproximationAlgorithm`.

    This class is not usable because it has sense only whithin the
    :class:`~openturns.FunctionalChaosAlgorithm`.
    """
    __swig_setmethods__ = {}
    for _s in [ApproximationAlgorithmImplementationFactory]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PenalizedLeastSquaresAlgorithmFactory, name, value)
    __swig_getmethods__ = {}
    for _s in [ApproximationAlgorithmImplementationFactory]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, PenalizedLeastSquaresAlgorithmFactory, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def build(self, *args): return _algo.PenalizedLeastSquaresAlgorithmFactory_build(self, *args)
    def __repr__(self): return _algo.PenalizedLeastSquaresAlgorithmFactory___repr__(self)
    def __init__(self, *args): 
        this = _algo.new_PenalizedLeastSquaresAlgorithmFactory(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_PenalizedLeastSquaresAlgorithmFactory
    __del__ = lambda self : None;
PenalizedLeastSquaresAlgorithmFactory_swigregister = _algo.PenalizedLeastSquaresAlgorithmFactory_swigregister
PenalizedLeastSquaresAlgorithmFactory_swigregister(PenalizedLeastSquaresAlgorithmFactory)

class KissFFT(openturns.statistics.FFTImplementation):
    """
    Kiss FFT.

    See also
    --------
    FFT

    Notes
    -----
    The KissFFT class inherits from the :class:`~openturns.FFT` class. The methods
    are the same as the FFT class (there is no additional method). This class
    interacts with the kissfft implemented and return results as OpenTURNS objects
    (:class:`~openturns.NumericalComplexCollection`).
    """
    __swig_setmethods__ = {}
    for _s in [openturns.statistics.FFTImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, KissFFT, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.statistics.FFTImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, KissFFT, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def transform(self, *args):
        """
        Perform Fast Fourier Transform (fft).

        Parameters
        ----------
        collection : :class:`~openturns.NumericalComplexCollection` or :class:`~openturns.NumericalScalarCollection`, sequence of float
          Data to transform.

        Returns
        -------
        collection : :class:`~openturns.NumericalComplexCollection`
          The data in Fourier domain.

        Notes
        -----
        The Fast Fourier Transform writes as following:

        .. math::

            {\\rm y_k} = \\sum_{n=0}^{N-1} x_n exp(-2 i \\pi \\frac{kn}{N})

        where :math:`x` denotes the data to be transformed, of size :math:`N`.


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> result = fft.transform(ot.Normal(8).getRealization())

        """
        return _algo.KissFFT_transform(self, *args)

    def inverseTransform(self, *args):
        """
        Perform Inverse Fast Fourier Transform (fft).

        Parameters
        ----------
        collection : :class:`~openturns.NumericalComplexCollection` or :class:`~openturns.NumericalScalarCollection`, sequence of float
          Data to transform.

        Returns
        -------
        collection : :class:`~openturns.NumericalComplexCollection`
            The transformed data.

        Notes
        -----
        The Inverse Fast Fourier Transform writes as following:

        .. math::

            {\\rm y_k} = \\sum_{n=0}^{N-1} \\frac{1}{N} x_n exp(2 i \\pi \\frac{kn}{N})

        where :math:`x` denotes the data, of size :math:`N`, to be transformed.


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> collection = ot.NumericalComplexCollection([1+1j,2-0.3j,5-.3j,6+1j,9+8j,16+8j,0.3])
        >>> result = fft.inverseTransform(collection)

        """
        return _algo.KissFFT_inverseTransform(self, *args)

    def transform2D(self, *args):
        """
        Perform 2D FFT.

        Parameters
        ----------
        matrix : :class:`~openturns.ComplexMatrix`, :class:`~openturns.Matrix`, 2-d sequence of float
          Data to transform.

        Returns
        -------
        result : :class:`~openturns.ComplexMatrix`
          The data in fourier domain.

        Notes
        -----
        The 2D Fast Fourier Transform writes as following:

        .. math::

            {\\rm Z_{k,l}} = \\sum_{m=0}^{M-1}\\sum_{n=0}^{N-1} X_{m,n} exp(-2 i \\pi \\frac{km}{M}) exp(-2 i \\pi \\frac{ln}{N})

        where :math:`X` denotes the data to be transformed with shape (:math:`M`,:math:`N`)


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> x = ot.Normal(8).getSample(16)
        >>> result = fft.transform2D(x)

        """
        return _algo.KissFFT_transform2D(self, *args)

    def inverseTransform2D(self, *args):
        """
        Perform 2D IFFT.

        Parameters
        ----------
        matrix : :class:`~openturns.ComplexMatrix`, :class:`~openturns.Matrix`, 2-d sequence of float
          Data to transform.

        Returns
        -------
        result : :class:`~openturns.ComplexMatrix`
          The data transformed.

        Notes
        -----
        The 2D Fast Inverse Fourier Transform writes as following:

        .. math::

            {\\rm Y_{k,l}} = \\frac{1}{M\\times N}\\sum_{m=0}^{M-1}\\sum_{n=0}^{N-1} Z_{m,n} exp(2 i \\pi \\frac{km}{M}) exp(2 i \\pi \\frac{ln}{N})

        where :math:`Z` denotes the data to be transformed with shape (:math:`M`,:math:`N`)


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> x = ot.Normal(8).getSample(16)
        >>> result = fft.inverseTransform2D(x)

        """
        return _algo.KissFFT_inverseTransform2D(self, *args)

    def transform3D(self, *args):
        """
        Perform 3D FFT.

        Parameters
        ----------
        tensor : :class:`~openturns.ComplexTensor` or :class:`~openturns.Tensor` or 3d array
          Data to transform.

        Returns
        -------
        result : :class:`~openturns.ComplexTensor`
          The data in fourier domain.

        Notes
        -----
        The 3D Fast Fourier Transform writes as following:

        .. math::

            {\\rm Z_{k,l,r}} = \\sum_{m=0}^{M-1}\\sum_{n=0}^{N-1}\\sum_{p=0}^{P-1} X_{m,n,p} exp(-2 i \\pi \\frac{km}{M}) exp(-2 i \\pi \\frac{ln}{N}) exp(-2 i \\pi \\frac{rp}{P})

        where :math:`X` denotes the data to be transformed with shape (:math:`M`,:math:`N`, :math:`P`)


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> x = ot.ComplexTensor(8,8,2)
        >>> y = ot.Normal(8).getSample(8)
        >>> x.setSheet(0,fft.transform2D(y))
        >>> z = ot.Normal(8).getSample(8)
        >>> x.setSheet(1,fft.transform2D(z))
        >>> result = fft.transform3D(x)

        """
        return _algo.KissFFT_transform3D(self, *args)

    def inverseTransform3D(self, *args):
        """
        Perform 3D IFFT.

        Parameters
        ----------
        tensor : :class:`~openturns.ComplexTensor` or :class:`~openturns.Tensor` or 3d array
          The data to be transformed.

        Returns
        -------
        result : :class:`~openturns.ComplexTensor`
          The transformed data.

        Notes
        -----
        The 3D Inverse Fast Fourier Transform writes as following:

        .. math::

            {\\rm Y_{k,l,r}} = \\sum_{m=0}^{M-1}\\sum_{n=0}^{N-1}\\sum_{p=0}^{P-1} \\frac{1}{M\\times N \\times P} Z_{m,n,p} exp(2 i \\pi \\frac{km}{M}) exp(2 i \\pi \\frac{ln}{N}) exp(2 i \\pi \\frac{rp}{P})

        where :math:`Z` denotes the data to be transformed with shape (:math:`M`, :math:`N`, :math:`P`)


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> x = ot.ComplexTensor(8,8,2)
        >>> y = ot.Normal(8).getSample(8)
        >>> x.setSheet(0, fft.transform2D(y))
        >>> z = ot.Normal(8).getSample(8)
        >>> x.setSheet(1, fft.transform2D(z))
        >>> result = fft.inverseTransform3D(x)

        """
        return _algo.KissFFT_inverseTransform3D(self, *args)

    def __repr__(self): return _algo.KissFFT___repr__(self)
    def __str__(self, offset=""): return _algo.KissFFT___str__(self, offset)
    def __init__(self, *args): 
        this = _algo.new_KissFFT(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_KissFFT
    __del__ = lambda self : None;
KissFFT_swigregister = _algo.KissFFT_swigregister
KissFFT_swigregister(KissFFT)

class IntegrationAlgorithmImplementation(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, IntegrationAlgorithmImplementation, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, IntegrationAlgorithmImplementation, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def integrate(self, *args): return _algo.IntegrationAlgorithmImplementation_integrate(self, *args)
    def __repr__(self): return _algo.IntegrationAlgorithmImplementation___repr__(self)
    def __str__(self, offset=""): return _algo.IntegrationAlgorithmImplementation___str__(self, offset)
    def __init__(self, *args): 
        this = _algo.new_IntegrationAlgorithmImplementation(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_IntegrationAlgorithmImplementation
    __del__ = lambda self : None;
IntegrationAlgorithmImplementation_swigregister = _algo.IntegrationAlgorithmImplementation_swigregister
IntegrationAlgorithmImplementation_swigregister(IntegrationAlgorithmImplementation)

class IntegrationAlgorithmImplementationTypedInterfaceObject(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, IntegrationAlgorithmImplementationTypedInterfaceObject, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.InterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, IntegrationAlgorithmImplementationTypedInterfaceObject, name)
    __repr__ = _swig_repr
    def __init__(self, *args): 
        this = _algo.new_IntegrationAlgorithmImplementationTypedInterfaceObject(*args)
        try: self.this.append(this)
        except: self.this = this
    def getImplementation(self, *args):
        """
        Accessor to the underlying implementation.

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

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

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _algo.IntegrationAlgorithmImplementationTypedInterfaceObject_setName(self, *args)

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

        Returns
        -------
        name : str
            The name of the object.
        """
        return _algo.IntegrationAlgorithmImplementationTypedInterfaceObject_getName(self)

    def __eq__(self, *args): return _algo.IntegrationAlgorithmImplementationTypedInterfaceObject___eq__(self, *args)
    __swig_destroy__ = _algo.delete_IntegrationAlgorithmImplementationTypedInterfaceObject
    __del__ = lambda self : None;
IntegrationAlgorithmImplementationTypedInterfaceObject_swigregister = _algo.IntegrationAlgorithmImplementationTypedInterfaceObject_swigregister
IntegrationAlgorithmImplementationTypedInterfaceObject_swigregister(IntegrationAlgorithmImplementationTypedInterfaceObject)

class IntegrationAlgorithm(IntegrationAlgorithmImplementationTypedInterfaceObject):
    """Proxy of C++ OT::IntegrationAlgorithm"""
    __swig_setmethods__ = {}
    for _s in [IntegrationAlgorithmImplementationTypedInterfaceObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IntegrationAlgorithm, name, value)
    __swig_getmethods__ = {}
    for _s in [IntegrationAlgorithmImplementationTypedInterfaceObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, IntegrationAlgorithm, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def integrate(self, *args): return _algo.IntegrationAlgorithm_integrate(self, *args)
    def __repr__(self): return _algo.IntegrationAlgorithm___repr__(self)
    def __str__(self, offset=""): return _algo.IntegrationAlgorithm___str__(self, offset)
    def __init__(self, *args): 
        this = _algo.new_IntegrationAlgorithm(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_IntegrationAlgorithm
    __del__ = lambda self : None;
IntegrationAlgorithm_swigregister = _algo.IntegrationAlgorithm_swigregister
IntegrationAlgorithm_swigregister(IntegrationAlgorithm)

class GaussKronrodRule(openturns.common.PersistentObject):
    """
    Gauss-Kronrod rule used in the integration algorithm.

    Parameters
    ----------
    myGaussKronrodPair : :class:`~openturns.GaussKronrodPair`
        It encodes the selected rule. 

        Available rules: 

        - GaussKronrodRule.G1K3, 
        - GaussKronrodRule.G3K7, 
        - GaussKronrodRule.G7K15, 
        - GaussKronrodRule.G11K23,
        - GaussKronrodRule.G15K31, 
        - GaussKronrodRule.G25K51. 

    Notes
    -----
    The Gauss-Kronrod rules :math:`G_mK_{2m+1}` with  :math:`m=2n+1` enable to build two approximations of the definite integral :math:`\\int_{-1}^1 f(t)\\di{t}` defined by:

    .. math::

        \\int_{-1}^1 f(t)\\di{t} \\simeq  \\omega_0f(0) + \\sum_{k=1}^n \\omega_k (f(\\xi_k)+f(-\\xi_k))

    and:

    .. math::

      \\int_{-1}^1 f(t)\\di{t}\\simeq  \\alpha_0f(0) + \\sum_{k=1}^{m} \\alpha_k (f(\\zeta_k)+f(-\\zeta_k))

    We have :math:`\\xi_k>0`,  :math:`\\zeta_k>0`, :math:`\\zeta_{2j}=\\xi_j`, :math:`\\omega_k>0` and :math:`\\alpha_k>0`.

    The rule :math:`G_mK_{2m+1}` combines a :math:`m`-point Gauss rule and a :math:`(2m+1)`-point Kronrod rule (re-using the :math:`m` nodes of the Gauss method). The nodes are defined on :math:`[-1, 1]` and always contain the node 0 when :math:`m`  is odd. 

    Examples
    --------
    Create an Gauss-Kronrod rule:

    >>> import openturns as ot
    >>> myRule = ot.GaussKronrodRule(ot.GaussKronrodRule.G15K31)
    """
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GaussKronrodRule, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, GaussKronrodRule, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    G1K3 = _algo.GaussKronrodRule_G1K3
    G3K7 = _algo.GaussKronrodRule_G3K7
    G7K15 = _algo.GaussKronrodRule_G7K15
    G11K23 = _algo.GaussKronrodRule_G11K23
    G15K31 = _algo.GaussKronrodRule_G15K31
    G25K51 = _algo.GaussKronrodRule_G25K51
    def __repr__(self): return _algo.GaussKronrodRule___repr__(self)
    def __str__(self, offset=""): return _algo.GaussKronrodRule___str__(self, offset)
    def getPair(self):
        """
        Accessor to pair definig the rule.

        Returns
        -------
        gkPair : :class:`~openturns.GaussKronrodPair`
            Id of the Gauss-Kronrod rule.
        """
        return _algo.GaussKronrodRule_getPair(self)

    def getOrder(self):
        """
        Accessor to :math:`m` parameter.

        Returns
        -------
        m : int
            The number of points used for the Gauss approximation.
        """
        return _algo.GaussKronrodRule_getOrder(self)

    def getZeroGaussWeight(self):
        """
        Accessor to the first Gauss weight.

        Returns
        -------
        zeroKronrodWeight : float
            The  first weight :math:`\\omega_0`.

        """
        return _algo.GaussKronrodRule_getZeroGaussWeight(self)

    def getOtherGaussWeights(self):
        """
        Accessor to the weights used in the Gauss approximation.

        Returns
        -------
        otherGaussWeights : :class:`~openturns.NumericalPoint`
            The  weights :math:`(\\omega_k)_{1 \\leq k \\leq n}`
        """
        return _algo.GaussKronrodRule_getOtherGaussWeights(self)

    def getOtherKronrodNodes(self):
        """
        Accessor to the positive nodes used in the Gauss-Kronrod approximation.

        Returns
        -------
        otherKronrodNodes : :class:`~openturns.NumericalPoint`
            The  positive nodes :math:`(\\zeta_k)_{1 \\leq k \\leq m}`
            It contains the positive Gauss nodes as we have :math:`\\zeta_{2j}=\\xi_j`.

        """
        return _algo.GaussKronrodRule_getOtherKronrodNodes(self)

    def getZeroKronrodWeight(self):
        """
        Accessor to the first Kronrod weight.

        Returns
        -------
        zeroKronrodWeight : float
            The  first weight :math:`\\alpha_0`.

        """
        return _algo.GaussKronrodRule_getZeroKronrodWeight(self)

    def getOtherKronrodWeights(self):
        """
        Accessor to the  positive nodes used in the Gauss-Kronrod approximation.

        Returns
        -------
        otherKronrodWeights : :class:`~openturns.NumericalPoint`
            The  weights :math:`(\\alpha_k)_{1 \\leq k \\leq m}`.

        """
        return _algo.GaussKronrodRule_getOtherKronrodWeights(self)

    def __init__(self, *args): 
        this = _algo.new_GaussKronrodRule(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_GaussKronrodRule
    __del__ = lambda self : None;
GaussKronrodRule_swigregister = _algo.GaussKronrodRule_swigregister
GaussKronrodRule_swigregister(GaussKronrodRule)

class GaussKronrod(IntegrationAlgorithmImplementation):
    """
    Adaptive integration algorithm of Gauss-Kronrod.

    Parameters
    ----------
    maximumSubIntervals : int
        The maximal number of subdivisions of the interval :math:`[a,b]`
    maximumError : float
        The maximal error between Gauss and Kronrod approximations.
    GKRule : :class:`~openturns.GaussKronrodRule`
        The rule that fixes the number of points used in the Gauss and Kronrod approximations. 

    Notes
    -----
    The Gauss-Kronrod algorithm enables to approximate the definite integral:

    .. math::

        \\int_{a}^b f(t)\\di{t}


    with :math:`f: \\Rset \\mapsto \\Rset^p`, using both approximations : Gauss and Kronrod ones defined by:

    .. math::

        \\int_{-1}^1 f(t)\\d{t} \\simeq  \\omega_0f(0) + \\sum_{k=1}^n \\omega_k (f(\\xi_k)+f(-\\xi_k))

    and:

    .. math::

      \\int_{-1}^1 f(t)\\di{t}\\simeq  \\alpha_0f(0) + \\sum_{k=1}^{m} \\alpha_k (f(\\zeta_k)+f(-\\zeta_k))

    where :math:`\\xi_k>0`,  :math:`\\zeta_k>0`, :math:`\\zeta_{2j}=\\xi_j`, :math:`\\omega_k>0` and :math:`\\alpha_k>0`.



    The Gauss-Kronrod algorithm evaluates the integral using the Gauss and the Konrod approximations. If the difference between both approximations is greater that *maximumError*, then the interval :math:`[a,b]` is subdivided into 2 subintervals with the same length. The Gauss-Kronrod algorithm is then applied on both subintervals with the sames rules. The algorithm is iterative until the  difference between both approximations is less that *maximumError*. In that case, the integral on the subinterval is approximated by the Kronrod sum. The subdivision process is limited by *maximumSubIntervals* that imposes the maximum number of subintervals.

    The final integral is the sum of the integrals evaluated on the subintervals.

    Examples
    --------
    Create a Gauss-Kronrod algorithm:

    >>> import openturns as ot
    >>> algo = ot.GaussKronrod(100000, 1e-13, ot.GaussKronrodRule(ot.GaussKronrodRule.G11K23))
    """
    __swig_setmethods__ = {}
    for _s in [IntegrationAlgorithmImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GaussKronrod, name, value)
    __swig_getmethods__ = {}
    for _s in [IntegrationAlgorithmImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, GaussKronrod, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def integrate(self, *args):
        """
        Evaluation of the integral of :math:`f` on an interval.

        Available usages:
            integrate(*f, interval*)

            integrate(*f, interval, error*)

            integrate(*f, a, b, error, ai, bi, fi, ei*)

        Parameters
        ----------
        f : :class:`~openturns.NumericalMathFunction`, :math:`f: \\Rset \\mapsto \\Rset^p`
            The integrand function.
        interval : :class:`~openturns.Interval`, :math:`interval \\in \\Rset` 
            The integration domain. 
        error : :class:`~openturns.NumericalPoint`
            The error estimation of the approximation.
        a,b : float 
            Bounds of the integration interval.
        ai, bi, ei : :class:`~openturns.NumericalPoint`; 
            *ai* is the set of lower bounds of the subintervals; 

            *bi* the corresponding upper bounds; 

            *ei* the associated error estimation. 
        fi : :class:`~openturns.NumericalSample`
            *fi* is the set of :math:`\\int_{ai}^{bi} f(t)\\di{t}`

        Returns
        -------
        value : :class:`~openturns.NumericalPoint`
            Approximation of the integral.


        Examples
        --------
        >>> import openturns as ot
        >>> f = ot.NumericalMathFunction('x', 'abs(sin(x))')
        >>> a = -2.5
        >>> b = 4.5
        >>> algoGK = ot.GaussKronrod(100000, 1e-13, ot.GaussKronrodRule(ot.GaussKronrodRule.G11K23))

        Use the high-level usage:

        >>> value = algoGK.integrate(f, ot.Interval(a, b))[0]
        >>> print(value)
        4.590...

        Use the low-level usage:

        >>> error = ot.NumericalPoint()
        >>> ai = ot.NumericalPoint()
        >>> bi = ot.NumericalPoint()
        >>> ei = ot.NumericalPoint()
        >>> fi = ot.NumericalSample()
        >>> value2 = algoGK.integrate(f, a, b, error, ai, bi, fi, ei)[0]
        >>> print(value2)
        4.590...
        """
        return _algo.GaussKronrod_integrate(self, *args)

    def getMaximumSubIntervals(self):
        """
        Accessor to the maximal  number of subdivisions of :math:`[a,b]`.

        Returns
        -------
        maximumSubIntervals : float, positive
            The maximal number of subdivisions of the interval :math:`[a,b]`.
        """
        return _algo.GaussKronrod_getMaximumSubIntervals(self)

    def setMaximumSubIntervals(self, *args):
        """
        Set the maximal  number of subdivisions of :math:`[a,b]`.

        Parameters
        ----------
        maximumSubIntervals : float, positive
            The maximal number of subdivisions of the interval :math:`[a,b]`.
        """
        return _algo.GaussKronrod_setMaximumSubIntervals(self, *args)

    def getMaximumError(self):
        """
        Accessor to the maximal error between Gauss and Kronrod approximations.

        Returns
        -------
        maximumErrorvalue : float, positive
            The maximal error between Gauss and Kronrod approximations.
        """
        return _algo.GaussKronrod_getMaximumError(self)

    def setMaximumError(self, *args):
        """
        Set the maximal error between Gauss and Kronrod approximations.

        Parameters
        ----------
        maximumErrorvalue : float, positive
            The maximal error between Gauss and Kronrod approximations.
        """
        return _algo.GaussKronrod_setMaximumError(self, *args)

    def getRule(self):
        """
        Accessor to the Gauss-Kronrod rule used in the integration algorithm.

        Returns
        -------
        rule : :class:`~openturns.GaussKronrodRule`
            The Gauss-Kronrod rule used in the integration algorithm.
        """
        return _algo.GaussKronrod_getRule(self)

    def setRule(self, *args):
        """
        Set the Gauss-Kronrod rule used in the integration algorithm.

        Parameters
        ----------
        rule : :class:`~openturns.GaussKronrodRule`
            The Gauss-Kronrod rule used in the integration algorithm.
        """
        return _algo.GaussKronrod_setRule(self, *args)

    def __repr__(self): return _algo.GaussKronrod___repr__(self)
    def __str__(self, offset=""): return _algo.GaussKronrod___str__(self, offset)
    def __init__(self, *args): 
        this = _algo.new_GaussKronrod(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_GaussKronrod
    __del__ = lambda self : None;
GaussKronrod_swigregister = _algo.GaussKronrod_swigregister
GaussKronrod_swigregister(GaussKronrod)

class IteratedQuadrature(IntegrationAlgorithmImplementation):
    """
    Multivariate integration algorithm.

    Parameters
    ----------
    univariateQuadrature : :class:`~openturns.IntegrationAlgorithm`
        By default, the integration algorithm is the Gauss-Kronrod algorithm (:class:`~openturns.GaussKronrod`)  with the following parameters: maximumSubIntervals=32, maximumError= :math:`1e-7` and GKRule = G3K7. 
        Note that the default parametrisation of the :class:`~openturns.GaussKronrod` class leads to a more precise evaluation of the integral but the cost is greater. It is recommended to increase the order of the quadratic rule and the number of sub intervals if the integrand or one of the bound functions is smooth but with many oscillations. 

    Notes
    -----
    This class enables to approximate the following integral:

    .. math::

        I_f = \\int_{a}^{b}\\, \\int_{l_1(x_0)}^{u_1(x_0)}\\, \\int_{l_2(x_0, x_1)}^{u_2(x_0,x_1)}\\, \\int_{l_{n-1}(x_0, \\dots, x_{n-2})}^{u_{n-1}(x_0, \\dots, x_{n-2})} \\, f(x_0, \\dots, x_{n-1})\\di{x_{n-1}}\\dots\\di{x_0}

    with :math:`f: \\Rset^n \\mapsto \\Rset^p`, :math:`l_k, u_k: \\Rset^k \\mapsto \\Rset` and :math:`n\\geq 1`. For :math:`n=1`, there is no bound functions :math:`l_k` and :math:`u_k`.


    Examples
    --------
    Create an iterated quadrature algorithm:

    >>> import openturns as ot
    >>> import math as m
    >>> a = -m.pi
    >>> b = m.pi
    >>> f = ot.NumericalMathFunction(['x', 'y'], ['1+cos(x)*sin(y)'])
    >>> l = [ot.NumericalMathFunction('x', ' 2+cos(x)')]
    >>> u = [ot.NumericalMathFunction('x', '-2-cos(x)')]

    Draw the graph of the integrand and the bounds:

    >>> g = ot.Graph('Integration nodes', 'x', 'y', True, 'topright')
    >>> g.add(f.draw([a,a],[b,b]))
    >>> curve = l[0].draw(a, b).getDrawable(0)
    >>> curve.setLineWidth(2)
    >>> curve.setColor('red')
    >>> g.add(curve)
    >>> curve = u[0].draw(a, b).getDrawable(0)
    >>> curve.setLineWidth(2)
    >>> curve.setColor('red')
    >>> g.add(curve)

    Evaluate the integral with high precision:

    >>> Iref = ot.IteratedQuadrature(ot.GaussKronrod(100000, 1e-13, ot.GaussKronrodRule(ot.GaussKronrodRule.G11K23))).integrate(f, a, b, l, u)

    Evaluate the integral with the default GaussKronrod algorithm:

    >>> f.enableHistory()
    >>> I1 = ot.IteratedQuadrature(ot.GaussKronrod()).integrate(f, a, b, l, u)
    >>> sample1 = f.getHistoryInput().getSample()
    >>> print(I1)
    [-25.132...]
    >>> n_evals = sample1.getSize()
    >>> print(n_evals)
    2116
    >>> err = abs(100.0*(1.0-I1[0]/Iref[0]))
    >>> print(err)
    2.2...e-14
    >>> cloud = ot.Cloud(sample1)
    >>> cloud.setPointStyle('fcircle')
    >>> cloud.setColor('green')
    >>> g.add(cloud)
    >>> f.clearHistory()

    Evaluate the integral with the default IteratedQuadrature algorithm:

    >>> I2 = ot.IteratedQuadrature().integrate(f, a, b, l, u)
    >>> sample2 = f.getHistoryInput().getSample()
    >>> print(I2)
    [-25.132...]
    >>> n_evals = sample2.getSize()
    >>> print(n_evals)
    5236
    >>> err = abs(100.0*(1.0-I2[0]/Iref[0]))
    >>> print(err)
    4.6...e-10
    >>> cloud = ot.Cloud(sample2)
    >>> cloud.setPointStyle('fcircle')
    >>> cloud.setColor('gold')
    >>> g.add(cloud)
    """
    __swig_setmethods__ = {}
    for _s in [IntegrationAlgorithmImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IteratedQuadrature, name, value)
    __swig_getmethods__ = {}
    for _s in [IntegrationAlgorithmImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, IteratedQuadrature, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def integrate(self, *args):
        """
        Evaluation of the integral of :math:`f` on a domain.

        Available usages:
            integrate(*f, interval*)

            integrate(*f, a, b, lowerBoundFunctions, upperBoundFunctions*)

        Parameters
        ----------
        f : :class:`~openturns.NumericalMathFunction`, :math:`f: \\Rset^n \\mapsto \\Rset^p`
            The integrand function.
        interval : :class:`~openturns.Interval`, :math:`interval \\in \\Rset^n` 
            The integration domain. 
        a,b : float 
            Bounds of the integration interval of the first scalar input :math:`x_0`
        lowerBoundFunctions, upperBoundFunctions : list of :class:`~openturns.NumericalMathFunction`
            List of :math:`n` functions :math:`(l_0, \\dots, l_{n-1})` and :math:`(u_0, \\dots, u_{n-1})` where :math:`l_k, u_k: \\Rset^k \\mapsto \\Rset` defining the integration domain as defined above.
            The bound functions can cross each other. 

        Returns
        -------
        value : :class:`~openturns.NumericalPoint`
            Approximation of the integral.
        """
        return _algo.IteratedQuadrature_integrate(self, *args)

    def __repr__(self): return _algo.IteratedQuadrature___repr__(self)
    def __str__(self, offset=""): return _algo.IteratedQuadrature___str__(self, offset)
    def __init__(self, *args): 
        this = _algo.new_IteratedQuadrature(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_IteratedQuadrature
    __del__ = lambda self : None;
IteratedQuadrature_swigregister = _algo.IteratedQuadrature_swigregister
IteratedQuadrature_swigregister(IteratedQuadrature)

class ExpertMixture(openturns.func.NumericalMathEvaluationImplementation):
    """
    Expert mixture defining a piece wise function according to a classifier.

    Available constructors:
        ExpertMixture(*basis, classifier*)

    Parameters
    ----------
    basis : :class:`~openturns.Basis`
        A basis which is a collection of :class:`~openturns.NumericalMathFunction`.
    classifier : :class:`~openturns.Classifier`
        A classifier

    See also
    --------
    Classifier, MixtureClassifier

    Notes
    -----
    This implements an expert mixture which is a piece wise function :math:`f` 
    defined by the collection of functions :math:`(f_i)_{i=1, \\ldots, N}` given in
    *basis* and according to the classifier *classifier*:

    .. math::

        f(\\vect{x}) &= f_1(\\vect{x}) \\hspace{1em} \\forall \\vect{x} \\in \\text{Classe} 1 \\\\
                    &= f_k(\\vect{x}) \\hspace{1em} \\forall \\vect{x} \\in \\text{Classe} k \\\\
                    &= f_N(\\vect{x}) \\hspace{1em} \\forall \\vect{x} \\in \\text{Classe} N

    where the :math:`N` classes are defined by the classifier.

    Usage:

    - ExpertMixture(*input*)
     
    where *input* is a sequence of float or a 2-d sequence of float. It represents a
    point or a set of points to evaluate using the expert mixture.

    The input vector *input* is assigned to a particular class according to the
    rules defined by *classifier* and the associated marginal function :math:`f_i`
    is used to evaluate :math:`f(input)`.

    """
    __swig_setmethods__ = {}
    for _s in [openturns.func.NumericalMathEvaluationImplementation]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ExpertMixture, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.func.NumericalMathEvaluationImplementation]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, ExpertMixture, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def __eq__(self, *args): return _algo.ExpertMixture___eq__(self, *args)
    def __repr__(self): return _algo.ExpertMixture___repr__(self)
    def __str__(self, offset=""): return _algo.ExpertMixture___str__(self, offset)
    def __call__(self, *args): return _algo.ExpertMixture___call__(self, *args)
    def getInputDimension(self):
        """
        Accessor to the number of the inputs.

        Returns
        -------
        number_inputs : int
            Number of inputs.

        Examples
        --------
        >>> import openturns as ot
        >>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
        ...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
        >>> print(f.getInputDimension())
        2
        """
        return _algo.ExpertMixture_getInputDimension(self)

    def getOutputDimension(self):
        """
        Accessor to the number of the outputs.

        Returns
        -------
        number_outputs : int
            Number of outputs.

        Examples
        --------
        >>> import openturns as ot
        >>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
        ...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
        >>> print(f.getOutputDimension())
        1
        """
        return _algo.ExpertMixture_getOutputDimension(self)

    def getExperts(self):
        """
        Accessor the basis.

        Returns
        -------
        basis : :class:`~openturns.Basis`
            The collection of functions :math:`(f_i)_{i=1, \\ldots, N}`.
        """
        return _algo.ExpertMixture_getExperts(self)

    def setExperts(self, *args):
        """
        Accessor the basis.

        Parameters
        ----------
        basis : :class:`~openturns.Basis`
            The collection of functions :math:`(f_i)_{i=1, \\ldots, N}`.
        """
        return _algo.ExpertMixture_setExperts(self, *args)

    def getClassifier(self):
        """
        Accessor the classifier.

        Returns
        -------
        classifier : :class:`~openturns.Classifier`
            The classifier.
        """
        return _algo.ExpertMixture_getClassifier(self)

    def setClassifier(self, *args):
        """
        Accessor the classifier.

        Parameters
        ----------
        classifier : :class:`~openturns.Classifier`
            The classifier.
        """
        return _algo.ExpertMixture_setClassifier(self, *args)

    def __init__(self, *args): 
        this = _algo.new_ExpertMixture(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_ExpertMixture
    __del__ = lambda self : None;
ExpertMixture_swigregister = _algo.ExpertMixture_swigregister
ExpertMixture_swigregister(ExpertMixture)

class KarhunenLoeveP1Factory(openturns.common.PersistentObject):
    """
    Computation of Karhunen-Loeve decomposition using P1 approximation.

    Parameters
    ----------
    mesh : :class:`~openturns.Mesh`
        The mesh on which the covariance model and the Karhunen-Loeve eigenfunctions (modes) are discretized.
    threshold : float
        The minimal relative amplitude of the eigenvalues to consider in the decomposition wrt the maximum eigenvalue.

    Notes
    -----
    The Karhunen-Loeve decomposition using P1 approximation allows to approximate the solution of the second kind Fredholm equation:

    .. math::

        \\int_{\\cD} \\mat{C}(\\vect{s},\\vect{t})\\vect{\\phi}_n(\\vect{s})\\di{\\vect{s}}=\\lambda_n\\vect{\\phi}_n(\\vect{t})


    with :math:`\\mat{C}: \\cD\\times\\cD \\mapsto \\cS^+_d(\\Rset)` a given covariance function, :math:`\\lambda_n` a nonincreasing sequence of nonnegative values (the **eigenvalues** of the equation) and :math:`\\vect{\\phi}_n: \\cD\\mapsto\\Rset^d` the associated sequence of **eigenfunctions**, normalized by :math:`\\int_{\\cD_N}\\|\\vect{\\phi}_n(\\vect{s})\\|^2\\di{\\vect{s}}=1`.

    The Karhunen-Loeve P1 approximation consists in replacing the covariance model :math:`\\mat{C}` by its P1 approximation :math:`\\hat{\\mat{C}}` on a mesh :math:`\\cD_N` which approximates the domain :math:`\\cD`:

    .. math::
        \\forall \\vect{s},\\vect{t}\\in\\cD_N,\\quad \\hat{\\mat{C}}(\\vect{s},\\vect{t})=\\sum_{\\vect{\\xi}_i,\\vect{\\xi}_j\\in\\cV_N}\\mat{C}(\\vect{\\xi}_i,\\vect{\\xi}_j)\\theta_i(\\vect{s})\\theta_j(\\vect{t})

    Where :math:`\\theta_n: \\cD_N \\mapsto \\Rset` are the basis functions of the P1 finite element space associated to :math:`\\cD_N`, see :class:`~openturns.P1LagrangeEvaluationImplementation`.

    Examples
    --------
    Create a Karhunen-Loeve P1 factory:

    >>> import openturns as ot
    >>> mesh = ot.IntervalMesher([10]*2).build(ot.Interval([-1.0]*2, [1.0]*2))
    >>> threshold = 0.01
    >>> factory = ot.KarhunenLoeveP1Factory(mesh, threshold)
    """
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, KarhunenLoeveP1Factory, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, KarhunenLoeveP1Factory, name)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def build(self, *args):
        """
        Computation of the eigenvalues and eigen functions.

        Parameters
        ----------
        C : :class:`~openturns.CovarianceModel`, :math:`\\mat{C}: \\cD\\times\\cD \\mapsto \\cS^+_d(\\Rset)`
            The covariance model.
        ev : :class:`~openturns.NumericalPoint`
            The eigenvalues :math:`\\lambda_n` in descending order such that :math:`\\lambda_n/\\lambda_0\\geq\\mathrm{threshold}`

        Returns
        -------
        functions : :class:`~openturns.Basis`
            Eigen functions of the covariance model as a basis of functions using :class:`~openturns.P1LagrangeEvaluationImplementation`.

        Examples
        --------
        >>> import openturns as ot
        >>> mesh = ot.IntervalMesher([10]*2).build(ot.Interval([-1.0]*2, [1.0]*2))
        >>> threshold = 0.01
        >>> factory = ot.KarhunenLoeveP1Factory(mesh, threshold)
        >>> model = ot.AbsoluteExponential([1.0]*2)
        >>> ev = ot.NumericalPoint()
        >>> functions = factory.build(model, ev)
        """
        return _algo.KarhunenLoeveP1Factory_build(self, *args)

    def buildAsProcessSample(self, *args):
        """
        Computation of the eigenvalues and eigen functions values at nodes.

        Parameters
        ----------
        C : :class:`~openturns.CovarianceModel`, :math:`\\mat{C}: \\cD\\times\\cD \\mapsto \\cS^+_d(\\Rset)`
            The covariance model.
        ev : :class:`~openturns.NumericalPoint`
            The eigenvalues :math:`\\lambda_n` in descending order such that :math:`\\lambda_n\\geq\\mathrm{threshold}\\,\\lambda_0`

        Returns
        -------
        modes : :class:`~openturns.ProcessSample`
            Values of the eigen functions at the nodes :math:`\\cV_N` of the mesh :math:`\\cD_N`.

        Examples
        --------
        >>> import openturns as ot
        >>> mesh = ot.IntervalMesher([10]*2).build(ot.Interval([-1.0]*2, [1.0]*2))
        >>> threshold = 0.01
        >>> factory = ot.KarhunenLoeveP1Factory(mesh, threshold)
        >>> model = ot.AbsoluteExponential([1.0]*2)
        >>> ev = ot.NumericalPoint()
        >>> modes = factory.buildAsProcessSample(model, ev)
        """
        return _algo.KarhunenLoeveP1Factory_buildAsProcessSample(self, *args)

    def __repr__(self): return _algo.KarhunenLoeveP1Factory___repr__(self)
    def __str__(self, offset=""): return _algo.KarhunenLoeveP1Factory___str__(self, offset)
    def __init__(self, *args): 
        this = _algo.new_KarhunenLoeveP1Factory(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_KarhunenLoeveP1Factory
    __del__ = lambda self : None;
KarhunenLoeveP1Factory_swigregister = _algo.KarhunenLoeveP1Factory_swigregister
KarhunenLoeveP1Factory_swigregister(KarhunenLoeveP1Factory)

class ApproximationAlgorithmImplementationPointer(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ApproximationAlgorithmImplementationPointer, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ApproximationAlgorithmImplementationPointer, name)
    __swig_setmethods__["ptr_"] = _algo.ApproximationAlgorithmImplementationPointer_ptr__set
    __swig_getmethods__["ptr_"] = _algo.ApproximationAlgorithmImplementationPointer_ptr__get
    if _newclass:ptr_ = _swig_property(_algo.ApproximationAlgorithmImplementationPointer_ptr__get, _algo.ApproximationAlgorithmImplementationPointer_ptr__set)
    def __init__(self, *args): 
        this = _algo.new_ApproximationAlgorithmImplementationPointer(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_ApproximationAlgorithmImplementationPointer
    __del__ = lambda self : None;
    def reset(self): return _algo.ApproximationAlgorithmImplementationPointer_reset(self)
    def __ref__(self, *args): return _algo.ApproximationAlgorithmImplementationPointer___ref__(self, *args)
    def __deref__(self): return _algo.ApproximationAlgorithmImplementationPointer___deref__(self)
    def isNull(self): return _algo.ApproximationAlgorithmImplementationPointer_isNull(self)
    def __nonzero__(self):
        return _algo.ApproximationAlgorithmImplementationPointer___nonzero__(self)
    __bool__ = __nonzero__


    def get(self): return _algo.ApproximationAlgorithmImplementationPointer_get(self)
    def getImplementation(self): return _algo.ApproximationAlgorithmImplementationPointer_getImplementation(self)
    def unique(self): return _algo.ApproximationAlgorithmImplementationPointer_unique(self)
    def use_count(self): return _algo.ApproximationAlgorithmImplementationPointer_use_count(self)
    def swap(self, *args): return _algo.ApproximationAlgorithmImplementationPointer_swap(self, *args)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def getX(self):
        """
        Accessor to the input sample.

        Returns
        -------
        x : :class:`~openturns.NumericalSample`
            Input sample
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getX(self)

    def getY(self):
        """
        Accessor to the output sample.

        Returns
        -------
        y : :class:`~openturns.NumericalSample`
            Input sample
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getY(self)

    def getWeight(self):
        """
        Accessor to the weights.

        Returns
        -------
        weight : :class:`~openturns.NumericalPoint`
            Output weights
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getWeight(self)

    def getPsi(self):
        """
        Accessor to the basis.

        Returns
        -------
        coefficients : :class:`~openturns.Basis`
            The basis
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getPsi(self)

    def __repr__(self): return _algo.ApproximationAlgorithmImplementationPointer___repr__(self)
    def __str__(self, offset=""): return _algo.ApproximationAlgorithmImplementationPointer___str__(self, offset)
    def run(self):
        """Run the algorithm."""
        return _algo.ApproximationAlgorithmImplementationPointer_run(self)

    def getCoefficients(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        coefficients : :class:`~openturns.NumericalPoint`
            The coefficients
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getCoefficients(self)

    def getResidual(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        coefficients : float
            The residual
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getResidual(self)

    def getRelativeError(self):
        """
        Accessor to the coefficients.

        Returns
        -------
        relativeError : float
            The relative error
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getRelativeError(self)

    def setVerbose(self, *args):
        """
        Accessor to the verbosity flag.

        Parameters
        ----------
        v : bool
            Enable or disable the verbosity.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_setVerbose(self, *args)

    def getVerbose(self):
        """
        Accessor to the verbosity flag.

        Returns
        -------
        v : bool.
            Verbosity
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getVerbose(self)

    def __eq__(self, *args): return _algo.ApproximationAlgorithmImplementationPointer___eq__(self, *args)
    def __ne__(self, *args): return _algo.ApproximationAlgorithmImplementationPointer___ne__(self, *args)
    def getId(self):
        """
        Accessor to the object's id.

        Returns
        -------
        id : int
           Internal unique identifier.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getId(self)

    def setShadowedId(self, *args):
        """
        Accessor to the object's shadowed id.

        Parameters
        ----------
        id : int
            Internal unique identifier.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_setShadowedId(self, *args)

    def getShadowedId(self):
        """
        Accessor to the object's shadowed id.

        Returns
        -------
        id : int
            Internal unique identifier.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getShadowedId(self)

    def setVisibility(self, *args):
        """
        Accessor to the object's visibility state.

        Parameters
        ----------
        visible : bool
            Visibility flag.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_setVisibility(self, *args)

    def getVisibility(self):
        """
        Accessor to the object's visibility state.

        Returns
        -------
        visible : bool
            Visibility flag.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getVisibility(self)

    def hasName(self):
        """
        Test if the object is named.

        Returns
        -------
        hasName : bool
            True if the name is not empty.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_hasName(self)

    def hasVisibleName(self):
        """
        Test if the object has a distinguishable name.

        Returns
        -------
        hasVisibleName : bool
            True if the name is not empty and not the default one.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_hasVisibleName(self)

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

        Returns
        -------
        name : str
            The name of the object.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_getName(self)

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

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _algo.ApproximationAlgorithmImplementationPointer_setName(self, *args)

ApproximationAlgorithmImplementationPointer_swigregister = _algo.ApproximationAlgorithmImplementationPointer_swigregister
ApproximationAlgorithmImplementationPointer_swigregister(ApproximationAlgorithmImplementationPointer)

class FFTImplementationPointer(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, FFTImplementationPointer, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, FFTImplementationPointer, name)
    __swig_setmethods__["ptr_"] = _algo.FFTImplementationPointer_ptr__set
    __swig_getmethods__["ptr_"] = _algo.FFTImplementationPointer_ptr__get
    if _newclass:ptr_ = _swig_property(_algo.FFTImplementationPointer_ptr__get, _algo.FFTImplementationPointer_ptr__set)
    def __init__(self, *args): 
        this = _algo.new_FFTImplementationPointer(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _algo.delete_FFTImplementationPointer
    __del__ = lambda self : None;
    def reset(self): return _algo.FFTImplementationPointer_reset(self)
    def __ref__(self, *args): return _algo.FFTImplementationPointer___ref__(self, *args)
    def __deref__(self): return _algo.FFTImplementationPointer___deref__(self)
    def isNull(self): return _algo.FFTImplementationPointer_isNull(self)
    def __nonzero__(self):
        return _algo.FFTImplementationPointer___nonzero__(self)
    __bool__ = __nonzero__


    def get(self): return _algo.FFTImplementationPointer_get(self)
    def getImplementation(self): return _algo.FFTImplementationPointer_getImplementation(self)
    def unique(self): return _algo.FFTImplementationPointer_unique(self)
    def use_count(self): return _algo.FFTImplementationPointer_use_count(self)
    def swap(self, *args): return _algo.FFTImplementationPointer_swap(self, *args)
    def getClassName(self):
        """
        Accessor to the object's name.

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

    def transform(self, *args):
        """
        Perform Fast Fourier Transform (fft).

        Parameters
        ----------
        collection : :class:`~openturns.NumericalComplexCollection` or :class:`~openturns.NumericalScalarCollection`, sequence of float
          Data to transform.

        Returns
        -------
        collection : :class:`~openturns.NumericalComplexCollection`
          The data in Fourier domain.

        Notes
        -----
        The Fast Fourier Transform writes as following:

        .. math::

            {\\rm y_k} = \\sum_{n=0}^{N-1} x_n exp(-2 i \\pi \\frac{kn}{N})

        where :math:`x` denotes the data to be transformed, of size :math:`N`.


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> result = fft.transform(ot.Normal(8).getRealization())

        """
        return _algo.FFTImplementationPointer_transform(self, *args)

    def inverseTransform(self, *args):
        """
        Perform Inverse Fast Fourier Transform (fft).

        Parameters
        ----------
        collection : :class:`~openturns.NumericalComplexCollection` or :class:`~openturns.NumericalScalarCollection`, sequence of float
          Data to transform.

        Returns
        -------
        collection : :class:`~openturns.NumericalComplexCollection`
            The transformed data.

        Notes
        -----
        The Inverse Fast Fourier Transform writes as following:

        .. math::

            {\\rm y_k} = \\sum_{n=0}^{N-1} \\frac{1}{N} x_n exp(2 i \\pi \\frac{kn}{N})

        where :math:`x` denotes the data, of size :math:`N`, to be transformed.


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> collection = ot.NumericalComplexCollection([1+1j,2-0.3j,5-.3j,6+1j,9+8j,16+8j,0.3])
        >>> result = fft.inverseTransform(collection)

        """
        return _algo.FFTImplementationPointer_inverseTransform(self, *args)

    def transform2D(self, *args):
        """
        Perform 2D FFT.

        Parameters
        ----------
        matrix : :class:`~openturns.ComplexMatrix`, :class:`~openturns.Matrix`, 2-d sequence of float
          Data to transform.

        Returns
        -------
        result : :class:`~openturns.ComplexMatrix`
          The data in fourier domain.

        Notes
        -----
        The 2D Fast Fourier Transform writes as following:

        .. math::

            {\\rm Z_{k,l}} = \\sum_{m=0}^{M-1}\\sum_{n=0}^{N-1} X_{m,n} exp(-2 i \\pi \\frac{km}{M}) exp(-2 i \\pi \\frac{ln}{N})

        where :math:`X` denotes the data to be transformed with shape (:math:`M`,:math:`N`)


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> x = ot.Normal(8).getSample(16)
        >>> result = fft.transform2D(x)

        """
        return _algo.FFTImplementationPointer_transform2D(self, *args)

    def inverseTransform2D(self, *args):
        """
        Perform 2D IFFT.

        Parameters
        ----------
        matrix : :class:`~openturns.ComplexMatrix`, :class:`~openturns.Matrix`, 2-d sequence of float
          Data to transform.

        Returns
        -------
        result : :class:`~openturns.ComplexMatrix`
          The data transformed.

        Notes
        -----
        The 2D Fast Inverse Fourier Transform writes as following:

        .. math::

            {\\rm Y_{k,l}} = \\frac{1}{M\\times N}\\sum_{m=0}^{M-1}\\sum_{n=0}^{N-1} Z_{m,n} exp(2 i \\pi \\frac{km}{M}) exp(2 i \\pi \\frac{ln}{N})

        where :math:`Z` denotes the data to be transformed with shape (:math:`M`,:math:`N`)


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> x = ot.Normal(8).getSample(16)
        >>> result = fft.inverseTransform2D(x)

        """
        return _algo.FFTImplementationPointer_inverseTransform2D(self, *args)

    def transform3D(self, *args):
        """
        Perform 3D FFT.

        Parameters
        ----------
        tensor : :class:`~openturns.ComplexTensor` or :class:`~openturns.Tensor` or 3d array
          Data to transform.

        Returns
        -------
        result : :class:`~openturns.ComplexTensor`
          The data in fourier domain.

        Notes
        -----
        The 3D Fast Fourier Transform writes as following:

        .. math::

            {\\rm Z_{k,l,r}} = \\sum_{m=0}^{M-1}\\sum_{n=0}^{N-1}\\sum_{p=0}^{P-1} X_{m,n,p} exp(-2 i \\pi \\frac{km}{M}) exp(-2 i \\pi \\frac{ln}{N}) exp(-2 i \\pi \\frac{rp}{P})

        where :math:`X` denotes the data to be transformed with shape (:math:`M`,:math:`N`, :math:`P`)


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> x = ot.ComplexTensor(8,8,2)
        >>> y = ot.Normal(8).getSample(8)
        >>> x.setSheet(0,fft.transform2D(y))
        >>> z = ot.Normal(8).getSample(8)
        >>> x.setSheet(1,fft.transform2D(z))
        >>> result = fft.transform3D(x)

        """
        return _algo.FFTImplementationPointer_transform3D(self, *args)

    def inverseTransform3D(self, *args):
        """
        Perform 3D IFFT.

        Parameters
        ----------
        tensor : :class:`~openturns.ComplexTensor` or :class:`~openturns.Tensor` or 3d array
          The data to be transformed.

        Returns
        -------
        result : :class:`~openturns.ComplexTensor`
          The transformed data.

        Notes
        -----
        The 3D Inverse Fast Fourier Transform writes as following:

        .. math::

            {\\rm Y_{k,l,r}} = \\sum_{m=0}^{M-1}\\sum_{n=0}^{N-1}\\sum_{p=0}^{P-1} \\frac{1}{M\\times N \\times P} Z_{m,n,p} exp(2 i \\pi \\frac{km}{M}) exp(2 i \\pi \\frac{ln}{N}) exp(2 i \\pi \\frac{rp}{P})

        where :math:`Z` denotes the data to be transformed with shape (:math:`M`, :math:`N`, :math:`P`)


        Examples
        --------
        >>> import openturns as ot
        >>> fft = ot.FFT()
        >>> x = ot.ComplexTensor(8,8,2)
        >>> y = ot.Normal(8).getSample(8)
        >>> x.setSheet(0, fft.transform2D(y))
        >>> z = ot.Normal(8).getSample(8)
        >>> x.setSheet(1, fft.transform2D(z))
        >>> result = fft.inverseTransform3D(x)

        """
        return _algo.FFTImplementationPointer_inverseTransform3D(self, *args)

    def __repr__(self): return _algo.FFTImplementationPointer___repr__(self)
    def __str__(self, offset=""): return _algo.FFTImplementationPointer___str__(self, offset)
    def __eq__(self, *args): return _algo.FFTImplementationPointer___eq__(self, *args)
    def __ne__(self, *args): return _algo.FFTImplementationPointer___ne__(self, *args)
    def getId(self):
        """
        Accessor to the object's id.

        Returns
        -------
        id : int
           Internal unique identifier.
        """
        return _algo.FFTImplementationPointer_getId(self)

    def setShadowedId(self, *args):
        """
        Accessor to the object's shadowed id.

        Parameters
        ----------
        id : int
            Internal unique identifier.
        """
        return _algo.FFTImplementationPointer_setShadowedId(self, *args)

    def getShadowedId(self):
        """
        Accessor to the object's shadowed id.

        Returns
        -------
        id : int
            Internal unique identifier.
        """
        return _algo.FFTImplementationPointer_getShadowedId(self)

    def setVisibility(self, *args):
        """
        Accessor to the object's visibility state.

        Parameters
        ----------
        visible : bool
            Visibility flag.
        """
        return _algo.FFTImplementationPointer_setVisibility(self, *args)

    def getVisibility(self):
        """
        Accessor to the object's visibility state.

        Returns
        -------
        visible : bool
            Visibility flag.
        """
        return _algo.FFTImplementationPointer_getVisibility(self)

    def hasName(self):
        """
        Test if the object is named.

        Returns
        -------
        hasName : bool
            True if the name is not empty.
        """
        return _algo.FFTImplementationPointer_hasName(self)

    def hasVisibleName(self):
        """
        Test if the object has a distinguishable name.

        Returns
        -------
        hasVisibleName : bool
            True if the name is not empty and not the default one.
        """
        return _algo.FFTImplementationPointer_hasVisibleName(self)

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

        Returns
        -------
        name : str
            The name of the object.
        """
        return _algo.FFTImplementationPointer_getName(self)

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

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _algo.FFTImplementationPointer_setName(self, *args)

FFTImplementationPointer_swigregister = _algo.FFTImplementationPointer_swigregister
FFTImplementationPointer_swigregister(FFTImplementationPointer)

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


