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

"""Copulas."""

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
    from . import _model_copula2
else:
    import _model_copula2

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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


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


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


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


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


import openturns.base
import openturns.common
import openturns.typ
import openturns.statistics
import openturns.graph
import openturns.func
import openturns.geom
import openturns.iterative_statistics
import openturns.func2
import openturns.diff
import openturns.optim
import openturns.experiment
import openturns.solver
import openturns.algo
import openturns.model_copula
class AliMikhailHaqCopula(openturns.model_copula.ArchimedeanCopula):
    r"""
    AliMikhailHaq copula.

    The AliMikhailHaq copula is a bivariate Archimedean copula defined by:

    .. math::

        C(u_1, u_2) = \frac{u_1 u_2}{1- \theta (1 - u_1)(1 - u_2)}

    for :math:`(u_1, u_2) \in [0, 1]^2`

    And its generator is:

    .. math::

        \varphi(t) = \log \left( \frac{1-\theta(1-t)}{t} \right)

    Parameters
    ----------
    theta : float, optional
        Parameter :math:`\theta`, :math:`-1 \leq \theta \leq 1`.
        Default value is 0.5.

    See also
    --------
    ArchimedeanCopula

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> copula = ot.AliMikhailHaqCopula(0.5)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.AliMikhailHaqCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.AliMikhailHaqCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.AliMikhailHaqCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.AliMikhailHaqCopula_getRealization(self)

    def computeDDF(self, *args):
        r"""
        Compute the derivative density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            The input value where the conditional derivative density function must be evaluated.

        Returns
        -------
        ddf : :class:`~openturns.Point`, :class:`~openturns.Sample`
            DDF value at *x*.

        Notes
        -----
        The derivative density function is the gradient of the probability density
        function with respect to :math:`\vect{x}`:

        .. math::

            \vect{\nabla}_{\vect{x}} f_{\vect{X}}(\vect{x}) =
                \Tr{\left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_1},
                         \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_d}\right)},
                \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.AliMikhailHaqCopula_computeDDF(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.AliMikhailHaqCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.AliMikhailHaqCopula_computeCDF(self, *args)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.AliMikhailHaqCopula_getKendallTau(self)

    def getSpearmanCorrelation(self):
        r"""
        Accessor to the Spearman correlation matrix.

        Returns
        -------
        R : :class:`~openturns.CorrelationMatrix`
            Spearman's correlation matrix.

        Notes
        -----
        Spearman's (rank) correlation is defined as the normalized covariance matrix
        of the copula (ie that of the uniform margins):

        .. math::

            \mat{\rho_S} = \left[\frac{\Cov{F_{X_i}(X_i), F_{X_j}(X_j)}}
                                      {\sqrt{\Var{F_{X_i}(X_i)} \Var{F_{X_j}(X_j)}}},
                                 \quad i,j = 1, \ldots, d\right]

        See Also
        --------
        getKendallTau
        """
        return _model_copula2.AliMikhailHaqCopula_getSpearmanCorrelation(self)

    def computePDFGradient(self, point):
        r"""
        Compute the gradient of the probability density function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dfdtheta : :class:`~openturns.Point`
            Partial derivatives of the PDF with respect to the distribution
            parameters at input *x*.

        Notes
        -----
        Let :math:`\vect{\theta}` be the vector of parameters of the distribution. Then
        the gradient of the probability density function :math:`f_{\vect{X}}` is defined by:

        .. math::

            \left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_1}, \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_d}\right)

        """
        return _model_copula2.AliMikhailHaqCopula_computePDFGradient(self, point)

    def computeCDFGradient(self, point):
        r"""
        Compute the gradient of the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dFdtheta : :class:`~openturns.Point`
            Partial derivatives of the CDF with respect to the distribution
            parameters at *x*.
        """
        return _model_copula2.AliMikhailHaqCopula_computeCDFGradient(self, point)

    def computeQuantile(self, *args):
        r"""
        Compute the quantile function.

        Parameters
        ----------
        p : float (or sequence of float), :math:`p \in [0, 1]`
            A probability.
        tail : bool, optional
            `True` indicates that the order considered is :math:`1-p`.
            Default value is `False`.

        Returns
        -------
        xp : :class:`~openturns.Point` (or :class:`~openturns.Sample`)
            If `tail=False`, the quantile of order :math:`p`.
            If `tail=True`, the quantile of order  :math:`1-p`.

        Notes
        -----
        If the underlying variable :math:`X` is scalar, then the quantile of order :math:`p`, denoted by :math:`x_p`,
        is defined as the generalized inverse of its cumulative distribution function:

        .. math::

             x_p  = F_X^{-1}(p) = \inf \{ x \in \Rset\, |\, F(x) \geq p \}, \quad 0 \leq p \leq 1.

        If the distribution is scalar and discrete, then the quantile of order :math:`p=0` is defined by:

        .. math::

            x_0 = \sup \{ x \in \Rset \, |\, F(x) = 0 \}.

        If the underlying variable :math:`\vect{X} = (X_1, \dots, X_d)` is of dimension :math:`d>1`, then
        the quantile of order :math:`p`, denoted by :math:`\vect{x}_p \in \Rset^d`, is such that:

        .. math::

            \begin{aligned}
                F_{\vect{X}}(\vect{x}_p) & =  p \\    
                F_{X_i}(\vect{x}_{p,i}) & =  F_{X_j}(\vect{x}_{p,j}) \quad \forall (i,j)
            \end{aligned}

        where :math:`F_{X_i}` is the :math:`i`-th marginal cdf. The last condition means that the quantile of order :math:`p`
        is such that all the components are associated to the same order of quantile of their margin.

        """
        return _model_copula2.AliMikhailHaqCopula_computeQuantile(self, *args)

    def computeConditionalCDF(self, *args):
        r"""
        Compute the conditional cumulative distribution function.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        p : float, sequence of float
            Conditional CDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional cumulative distribution function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})` is defined by:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
                \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.AliMikhailHaqCopula_computeConditionalCDF(self, *args)

    def computeConditionalQuantile(self, *args):
        r"""
        Compute the conditional quantile function of the last component.

        Conditional quantile with respect to the other fixed components.

        Parameters
        ----------
        p : float, sequence of float, :math:`p \in [0, 1]`
            Conditional quantile.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        xj : float
            Conditional quantile of order *p* of the component :math:`X_j`
            given that the components of indices :math:`k \leq j-1` are fixed and
            equal to *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional quantile of order :math:`p` of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p; x_1, \dots, x_{j-1})

        where :math:`F^{-1}` is the quantile function.
        For :math:`j=1`, it
        reduces to :math:`F^{-1}_{X_1}(p)`.

        See Also
        --------
        computeQuantile, computeConditionalCDF
        """
        return _model_copula2.AliMikhailHaqCopula_computeConditionalQuantile(self, *args)

    def computeArchimedeanGenerator(self, t):
        r"""
        Compute the Archimedean generator :math:`\varphi`.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.AliMikhailHaqCopula_computeArchimedeanGenerator(self, t)

    def computeInverseArchimedeanGenerator(self, t):
        r"""
        Compute the inverse of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
             :math:`\varphi^{-1}` the inverse of the Archimedean generator.
        """
        return _model_copula2.AliMikhailHaqCopula_computeInverseArchimedeanGenerator(self, t)

    def computeArchimedeanGeneratorDerivative(self, t):
        r"""
        Compute the derivative of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The derivative of the Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.AliMikhailHaqCopula_computeArchimedeanGeneratorDerivative(self, t)

    def computeArchimedeanGeneratorSecondDerivative(self, t):
        r"""
        Compute the seconde derivative of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The seconde derivative of the Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.AliMikhailHaqCopula_computeArchimedeanGeneratorSecondDerivative(self, t)

    def computeUpperTailDependenceMatrix(self):
        r"""
        Compute the upper tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that its copula is
        denoted by :math:`C`.
        The upper tail dependence matrix is :math:`(\chi^{ij})_{1 \leq i, j \leq d}` where :math:`\chi^{ij}` is
        the upper tail dependence coefficient of the bivariate distribution :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi^{ij} = \lim_{u \to 1} \chi^{ij}(u)

        where  :math:`u \mapsto \chi^{ij}(u)` is the upper tail dependence function of the bivariate distribution
        :math:`(X_i, X_j)` defined by:

        .. math::

            \chi(u) = 2 - \frac{\log C(u,u)}{\log u}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chi = copula.computeUpperTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.AliMikhailHaqCopula_computeUpperTailDependenceMatrix(self)

    def computeLowerTailDependenceMatrix(self):
        r"""
        Compute the lower tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that
        its copula is denoted by :math:`C`.
        The lower tail dependence matrix is :math:`(\chi_L^{ij})_{1 \leq i, j \leq d}` where
        :math:`\chi_L^{ij}` is the lower tail dependence coefficient of the bivariate distribution
        :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi_L^{ij} = \lim_{u \to 0} \chi_L^{ij}(u)

        where  :math:`u \mapsto \chi_L^{ij}(u)` is the lower tail dependence function of the bivariate
        distribution :math:`(X_i, X_j)` defined by:

        .. math::

            \chi_L(u) = \frac{\log (1 - C(u,u))}{\log (1-u)}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chiL = copula.computeLowerTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.AliMikhailHaqCopula_computeLowerTailDependenceMatrix(self)

    def setParameter(self, parameter):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameter : sequence of float
            Parameter values.
        """
        return _model_copula2.AliMikhailHaqCopula_setParameter(self, parameter)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.AliMikhailHaqCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.AliMikhailHaqCopula_getParameterDescription(self)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.AliMikhailHaqCopula_hasIndependentCopula(self)

    def setTheta(self, theta):
        r"""
        Set the parameter :math:`\theta`.

        Parameters
        ----------
        theta : float, :math:`-1 \leq \theta \leq 1`
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.AliMikhailHaqCopula_setTheta(self, theta)

    def getTheta(self):
        r"""
        Get the parameter :math:`\theta`.

        Returns
        -------
        theta : float
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.AliMikhailHaqCopula_getTheta(self)

    def computeEntropy(self):
        r"""
        Compute the entropy of the distribution.

        Returns
        -------
        e : float
            Entropy of the distribution.

        Notes
        -----
        The entropy of a distribution is defined by:

        .. math::

            \cE_X = \Expect{-\log(p_X(\vect{X}))}

        Where the random vector :math:`\vect{X}` follows the probability
        distribution of interest, and :math:`p_X` is either the *probability
        density function* of :math:`\vect{X}` if it is continuous or the
        *probability distribution function* if it is discrete.

        """
        return _model_copula2.AliMikhailHaqCopula_computeEntropy(self)

    def __init__(self, *args):
        _model_copula2.AliMikhailHaqCopula_swiginit(self, _model_copula2.new_AliMikhailHaqCopula(*args))
    __swig_destroy__ = _model_copula2.delete_AliMikhailHaqCopula

# Register AliMikhailHaqCopula in _model_copula2:
_model_copula2.AliMikhailHaqCopula_swigregister(AliMikhailHaqCopula)
class AliMikhailHaqCopulaFactory(openturns.model_copula.DistributionFactoryImplementation):
    r"""
    AliMikhailHaq copula factory.

    Notes
    -----
    We note :math:`\Hat{\tau}_n` the Kendall-\ :math:`\tau` of the sample.

    The parameter :math:`\Hat{\theta}_n` is solution of:

    .. math::

        \displaystyle \Hat{\tau}_n = \displaystyle \frac{3\theta-2}{3\theta} - \frac{2(1-\theta)^2\ln(1-\theta)}{3\theta^2}

    See also
    --------
    DistributionFactory, AliMikhailHaqCopula
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

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

    def build(self, *args):
        r"""
        Build the distribution.

        **Available usages**:

            build()

            build(*sample*)

            build(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
            The parameters of the distribution.

        Returns
        -------
        dist : :class:`~openturns.Distribution`
            The estimated distribution.

            In the first usage, the default native distribution is built.
        """
        return _model_copula2.AliMikhailHaqCopulaFactory_build(self, *args)

    def buildAsAliMikhailHaqCopula(self, *args):
        r"""
        Estimate the copula as native copula.

        **Available usages**:

            buildAsAliMikhailHaqCopula()

            buildAsAliMikhailHaqCopula(*sample*)

            buildAsAliMikhailHaqCopula(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data of dimension 2.
        param : sequence of float of size 1
           The parameter :math:`\theta`.

        Returns
        -------
        copula : :class:`~openturns.AliMikhailHaqCopula`
            The estimated copula as an AliMikhailHaq copula.

            In the first usage, the default AliMikhailHaq copula is built.
        """
        return _model_copula2.AliMikhailHaqCopulaFactory_buildAsAliMikhailHaqCopula(self, *args)

    def __init__(self, *args):
        _model_copula2.AliMikhailHaqCopulaFactory_swiginit(self, _model_copula2.new_AliMikhailHaqCopulaFactory(*args))
    __swig_destroy__ = _model_copula2.delete_AliMikhailHaqCopulaFactory

# Register AliMikhailHaqCopulaFactory in _model_copula2:
_model_copula2.AliMikhailHaqCopulaFactory_swigregister(AliMikhailHaqCopulaFactory)
class ClaytonCopula(openturns.model_copula.ArchimedeanCopula):
    r"""
    Clayton copula.

    The Clayton copula is a bivariate asymmetric Archimedean copula, exhibiting
    greater dependence in the negative tail than in the positive. It is defined by:

    .. math::

        C(u_1, u_2) = (u_1^{-\theta} + u_2^{-\theta} - 1)^{-1/\theta}

    for :math:`(u_1, u_2) \in [0, 1]^2`

    And its generator is:

    .. math::

        \varphi(t) = \frac{1}{\theta} (t^{-\theta} - 1)

    The support of the copula is :math:`\{ (u,v)\in [0,1]^2, u^{-\theta} +  v^{-\theta} \geq 1 \}`. 

    If :math:`\theta <0`, the support is strictly included in :math:`[0,1]^2` and the frontier defined by :math:`\{ (u,v)\in [0,1]^2, u^{-\theta} +  v^{-\theta} = 1 \}` has a mass not equal to zero. In that case, the copula is a non strict archimedean copula.

    Parameters
    ----------
    theta : float, optional
        Parameter :math:`\theta`, :math:`\theta \geq -1`.
        Default value is 2.0.

    See also
    --------
    ArchimedeanCopula

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> copula = ot.ClaytonCopula(2.5)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.ClaytonCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.ClaytonCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.ClaytonCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.ClaytonCopula_getRealization(self)

    def computeDDF(self, *args):
        r"""
        Compute the derivative density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            The input value where the conditional derivative density function must be evaluated.

        Returns
        -------
        ddf : :class:`~openturns.Point`, :class:`~openturns.Sample`
            DDF value at *x*.

        Notes
        -----
        The derivative density function is the gradient of the probability density
        function with respect to :math:`\vect{x}`:

        .. math::

            \vect{\nabla}_{\vect{x}} f_{\vect{X}}(\vect{x}) =
                \Tr{\left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_1},
                         \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_d}\right)},
                \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.ClaytonCopula_computeDDF(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.ClaytonCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.ClaytonCopula_computeCDF(self, *args)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.ClaytonCopula_getKendallTau(self)

    def computePDFGradient(self, point):
        r"""
        Compute the gradient of the probability density function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dfdtheta : :class:`~openturns.Point`
            Partial derivatives of the PDF with respect to the distribution
            parameters at input *x*.

        Notes
        -----
        Let :math:`\vect{\theta}` be the vector of parameters of the distribution. Then
        the gradient of the probability density function :math:`f_{\vect{X}}` is defined by:

        .. math::

            \left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_1}, \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_d}\right)

        """
        return _model_copula2.ClaytonCopula_computePDFGradient(self, point)

    def computeCDFGradient(self, point):
        r"""
        Compute the gradient of the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dFdtheta : :class:`~openturns.Point`
            Partial derivatives of the CDF with respect to the distribution
            parameters at *x*.
        """
        return _model_copula2.ClaytonCopula_computeCDFGradient(self, point)

    def computeQuantile(self, *args):
        r"""
        Compute the quantile function.

        Parameters
        ----------
        p : float (or sequence of float), :math:`p \in [0, 1]`
            A probability.
        tail : bool, optional
            `True` indicates that the order considered is :math:`1-p`.
            Default value is `False`.

        Returns
        -------
        xp : :class:`~openturns.Point` (or :class:`~openturns.Sample`)
            If `tail=False`, the quantile of order :math:`p`.
            If `tail=True`, the quantile of order  :math:`1-p`.

        Notes
        -----
        If the underlying variable :math:`X` is scalar, then the quantile of order :math:`p`, denoted by :math:`x_p`,
        is defined as the generalized inverse of its cumulative distribution function:

        .. math::

             x_p  = F_X^{-1}(p) = \inf \{ x \in \Rset\, |\, F(x) \geq p \}, \quad 0 \leq p \leq 1.

        If the distribution is scalar and discrete, then the quantile of order :math:`p=0` is defined by:

        .. math::

            x_0 = \sup \{ x \in \Rset \, |\, F(x) = 0 \}.

        If the underlying variable :math:`\vect{X} = (X_1, \dots, X_d)` is of dimension :math:`d>1`, then
        the quantile of order :math:`p`, denoted by :math:`\vect{x}_p \in \Rset^d`, is such that:

        .. math::

            \begin{aligned}
                F_{\vect{X}}(\vect{x}_p) & =  p \\    
                F_{X_i}(\vect{x}_{p,i}) & =  F_{X_j}(\vect{x}_{p,j}) \quad \forall (i,j)
            \end{aligned}

        where :math:`F_{X_i}` is the :math:`i`-th marginal cdf. The last condition means that the quantile of order :math:`p`
        is such that all the components are associated to the same order of quantile of their margin.

        """
        return _model_copula2.ClaytonCopula_computeQuantile(self, *args)

    def computeConditionalCDF(self, *args):
        r"""
        Compute the conditional cumulative distribution function.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        p : float, sequence of float
            Conditional CDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional cumulative distribution function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})` is defined by:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
                \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.ClaytonCopula_computeConditionalCDF(self, *args)

    def computeConditionalQuantile(self, *args):
        r"""
        Compute the conditional quantile function of the last component.

        Conditional quantile with respect to the other fixed components.

        Parameters
        ----------
        p : float, sequence of float, :math:`p \in [0, 1]`
            Conditional quantile.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        xj : float
            Conditional quantile of order *p* of the component :math:`X_j`
            given that the components of indices :math:`k \leq j-1` are fixed and
            equal to *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional quantile of order :math:`p` of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p; x_1, \dots, x_{j-1})

        where :math:`F^{-1}` is the quantile function.
        For :math:`j=1`, it
        reduces to :math:`F^{-1}_{X_1}(p)`.

        See Also
        --------
        computeQuantile, computeConditionalCDF
        """
        return _model_copula2.ClaytonCopula_computeConditionalQuantile(self, *args)

    def computeArchimedeanGenerator(self, t):
        r"""
        Compute the Archimedean generator :math:`\varphi`.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.ClaytonCopula_computeArchimedeanGenerator(self, t)

    def computeInverseArchimedeanGenerator(self, t):
        r"""
        Compute the inverse of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
             :math:`\varphi^{-1}` the inverse of the Archimedean generator.
        """
        return _model_copula2.ClaytonCopula_computeInverseArchimedeanGenerator(self, t)

    def computeArchimedeanGeneratorDerivative(self, t):
        r"""
        Compute the derivative of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The derivative of the Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.ClaytonCopula_computeArchimedeanGeneratorDerivative(self, t)

    def computeArchimedeanGeneratorSecondDerivative(self, t):
        r"""
        Compute the seconde derivative of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The seconde derivative of the Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.ClaytonCopula_computeArchimedeanGeneratorSecondDerivative(self, t)

    def computeUpperTailDependenceMatrix(self):
        r"""
        Compute the upper tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that its copula is
        denoted by :math:`C`.
        The upper tail dependence matrix is :math:`(\chi^{ij})_{1 \leq i, j \leq d}` where :math:`\chi^{ij}` is
        the upper tail dependence coefficient of the bivariate distribution :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi^{ij} = \lim_{u \to 1} \chi^{ij}(u)

        where  :math:`u \mapsto \chi^{ij}(u)` is the upper tail dependence function of the bivariate distribution
        :math:`(X_i, X_j)` defined by:

        .. math::

            \chi(u) = 2 - \frac{\log C(u,u)}{\log u}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chi = copula.computeUpperTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.ClaytonCopula_computeUpperTailDependenceMatrix(self)

    def computeLowerTailDependenceMatrix(self):
        r"""
        Compute the lower tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that
        its copula is denoted by :math:`C`.
        The lower tail dependence matrix is :math:`(\chi_L^{ij})_{1 \leq i, j \leq d}` where
        :math:`\chi_L^{ij}` is the lower tail dependence coefficient of the bivariate distribution
        :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi_L^{ij} = \lim_{u \to 0} \chi_L^{ij}(u)

        where  :math:`u \mapsto \chi_L^{ij}(u)` is the lower tail dependence function of the bivariate
        distribution :math:`(X_i, X_j)` defined by:

        .. math::

            \chi_L(u) = \frac{\log (1 - C(u,u))}{\log (1-u)}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chiL = copula.computeLowerTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.ClaytonCopula_computeLowerTailDependenceMatrix(self)

    def setParameter(self, parameter):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameter : sequence of float
            Parameter values.
        """
        return _model_copula2.ClaytonCopula_setParameter(self, parameter)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.ClaytonCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.ClaytonCopula_getParameterDescription(self)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.ClaytonCopula_hasIndependentCopula(self)

    def setTheta(self, theta):
        r"""
        Set the parameter :math:`\theta`.

        Parameters
        ----------
        theta : float
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.ClaytonCopula_setTheta(self, theta)

    def getTheta(self):
        r"""
        Get the parameter :math:`\theta`.

        Returns
        -------
        theta : float
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.ClaytonCopula_getTheta(self)

    def __init__(self, *args):
        _model_copula2.ClaytonCopula_swiginit(self, _model_copula2.new_ClaytonCopula(*args))
    __swig_destroy__ = _model_copula2.delete_ClaytonCopula

# Register ClaytonCopula in _model_copula2:
_model_copula2.ClaytonCopula_swigregister(ClaytonCopula)
class ClaytonCopulaFactory(openturns.model_copula.DistributionFactoryImplementation):
    r"""
    Clayton Copula factory.

    Notes
    -----
    We use the following estimator:

    .. math::

        \displaystyle\Hat{\theta}_n=\frac{2\Hat{\tau}_n^{\strut}}{1_{\strut} - \Hat{\tau}_n}

    See also
    --------
    DistributionFactory, ClaytonCopula
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

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

    def build(self, *args):
        r"""
        Build the distribution.

        **Available usages**:

            build()

            build(*sample*)

            build(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
            The parameters of the distribution.

        Returns
        -------
        dist : :class:`~openturns.Distribution`
            The estimated distribution.

            In the first usage, the default native distribution is built.
        """
        return _model_copula2.ClaytonCopulaFactory_build(self, *args)

    def buildAsClaytonCopula(self, *args):
        r"""
        Estimate the copula as native copula.

        **Available usages**:

            buildAsClaytonCopula()

            buildAsClaytonCopula(*sample*)

            buildAsClaytonCopula(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data of dimension 2.
        param : sequence of float of size 1
           The parameter :math:`\theta`.

        Returns
        -------
        copula : :class:`~openturns.ClaytonCopula`
            The estimated copula as a Clayton copula.

            In the first usage, the default Clayton copula is built.
        """
        return _model_copula2.ClaytonCopulaFactory_buildAsClaytonCopula(self, *args)

    def __init__(self, *args):
        _model_copula2.ClaytonCopulaFactory_swiginit(self, _model_copula2.new_ClaytonCopulaFactory(*args))
    __swig_destroy__ = _model_copula2.delete_ClaytonCopulaFactory

# Register ClaytonCopulaFactory in _model_copula2:
_model_copula2.ClaytonCopulaFactory_swigregister(ClaytonCopulaFactory)
class FarlieGumbelMorgensternCopula(openturns.model_copula.DistributionImplementation):
    r"""
    FarlieGumbelMorgenstern copula.

    The FarlieGumbelMorgenstern copula is defined by:

    .. math::

        C(u_1, u_2) = u_1 u_2 (1 + \theta (1 - u_1)(1 - u_2))

    for :math:`(u_1, u_2) \in [0, 1]^2`

    Parameters
    ----------
    theta : float, optional
        Parameter :math:`\theta`, :math:`-1 \leq \theta \leq 1`.
        Default value is 0.5.

    See also
    --------
    Distribution

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> copula = ot.FarlieGumbelMorgensternCopula(0.7)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.FarlieGumbelMorgensternCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.FarlieGumbelMorgensternCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.FarlieGumbelMorgensternCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_getRealization(self)

    def computeDDF(self, *args):
        r"""
        Compute the derivative density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            The input value where the conditional derivative density function must be evaluated.

        Returns
        -------
        ddf : :class:`~openturns.Point`, :class:`~openturns.Sample`
            DDF value at *x*.

        Notes
        -----
        The derivative density function is the gradient of the probability density
        function with respect to :math:`\vect{x}`:

        .. math::

            \vect{\nabla}_{\vect{x}} f_{\vect{X}}(\vect{x}) =
                \Tr{\left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_1},
                         \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_d}\right)},
                \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computeDDF(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computeCDF(self, *args)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_getKendallTau(self)

    def computePDFGradient(self, point):
        r"""
        Compute the gradient of the probability density function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dfdtheta : :class:`~openturns.Point`
            Partial derivatives of the PDF with respect to the distribution
            parameters at input *x*.

        Notes
        -----
        Let :math:`\vect{\theta}` be the vector of parameters of the distribution. Then
        the gradient of the probability density function :math:`f_{\vect{X}}` is defined by:

        .. math::

            \left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_1}, \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_d}\right)

        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computePDFGradient(self, point)

    def computeCDFGradient(self, point):
        r"""
        Compute the gradient of the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dFdtheta : :class:`~openturns.Point`
            Partial derivatives of the CDF with respect to the distribution
            parameters at *x*.
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computeCDFGradient(self, point)

    def computeConditionalCDF(self, *args):
        r"""
        Compute the conditional cumulative distribution function.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        p : float, sequence of float
            Conditional CDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional cumulative distribution function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})` is defined by:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
                \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computeConditionalCDF(self, *args)

    def computeConditionalQuantile(self, *args):
        r"""
        Compute the conditional quantile function of the last component.

        Conditional quantile with respect to the other fixed components.

        Parameters
        ----------
        p : float, sequence of float, :math:`p \in [0, 1]`
            Conditional quantile.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        xj : float
            Conditional quantile of order *p* of the component :math:`X_j`
            given that the components of indices :math:`k \leq j-1` are fixed and
            equal to *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional quantile of order :math:`p` of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p; x_1, \dots, x_{j-1})

        where :math:`F^{-1}` is the quantile function.
        For :math:`j=1`, it
        reduces to :math:`F^{-1}_{X_1}(p)`.

        See Also
        --------
        computeQuantile, computeConditionalCDF
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computeConditionalQuantile(self, *args)

    def computeUpperTailDependenceMatrix(self):
        r"""
        Compute the upper tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that its copula is
        denoted by :math:`C`.
        The upper tail dependence matrix is :math:`(\chi^{ij})_{1 \leq i, j \leq d}` where :math:`\chi^{ij}` is
        the upper tail dependence coefficient of the bivariate distribution :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi^{ij} = \lim_{u \to 1} \chi^{ij}(u)

        where  :math:`u \mapsto \chi^{ij}(u)` is the upper tail dependence function of the bivariate distribution
        :math:`(X_i, X_j)` defined by:

        .. math::

            \chi(u) = 2 - \frac{\log C(u,u)}{\log u}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chi = copula.computeUpperTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computeUpperTailDependenceMatrix(self)

    def computeLowerTailDependenceMatrix(self):
        r"""
        Compute the lower tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that
        its copula is denoted by :math:`C`.
        The lower tail dependence matrix is :math:`(\chi_L^{ij})_{1 \leq i, j \leq d}` where
        :math:`\chi_L^{ij}` is the lower tail dependence coefficient of the bivariate distribution
        :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi_L^{ij} = \lim_{u \to 0} \chi_L^{ij}(u)

        where  :math:`u \mapsto \chi_L^{ij}(u)` is the lower tail dependence function of the bivariate
        distribution :math:`(X_i, X_j)` defined by:

        .. math::

            \chi_L(u) = \frac{\log (1 - C(u,u))}{\log (1-u)}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chiL = copula.computeLowerTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computeLowerTailDependenceMatrix(self)

    def setParameter(self, parameter):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameter : sequence of float
            Parameter values.
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_setParameter(self, parameter)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_getParameterDescription(self)

    def hasEllipticalCopula(self):
        r"""
        Test whether the copula of the distribution is elliptical or not.

        Returns
        -------
        test : bool
            Answer.

        See Also
        --------
        isElliptical
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_hasEllipticalCopula(self)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_hasIndependentCopula(self)

    def setTheta(self, theta):
        r"""
        Accessor to the :math:`theta` parameter.

        Parameters
        ----------
        theta : float
            The :math:`\theta` parameter, :math:`-1 \leq \theta \leq 1`.
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_setTheta(self, theta)

    def getTheta(self):
        r"""
        Accessor to the :math:`theta` parameter.

        Returns
        -------
        theta : float
            The :math:`\theta` parameter .
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_getTheta(self)

    def getMarginal(self, *args):
        r"""
        Accessor to marginal distributions.

        Parameters
        ----------
        i : int or list of ints, :math:`0 \leq i < d`
            Component(s) indice(s).

        Returns
        -------
        distribution : :class:`~openturns.Distribution`
            The marginal distribution of the selected component(s).
        """
        return _model_copula2.FarlieGumbelMorgensternCopula_getMarginal(self, *args)

    def computeEntropy(self):
        r"""
        Compute the entropy of the distribution.

        Returns
        -------
        e : float
            Entropy of the distribution.

        Notes
        -----
        The entropy of a distribution is defined by:

        .. math::

            \cE_X = \Expect{-\log(p_X(\vect{X}))}

        Where the random vector :math:`\vect{X}` follows the probability
        distribution of interest, and :math:`p_X` is either the *probability
        density function* of :math:`\vect{X}` if it is continuous or the
        *probability distribution function* if it is discrete.

        """
        return _model_copula2.FarlieGumbelMorgensternCopula_computeEntropy(self)

    def __init__(self, *args):
        _model_copula2.FarlieGumbelMorgensternCopula_swiginit(self, _model_copula2.new_FarlieGumbelMorgensternCopula(*args))
    __swig_destroy__ = _model_copula2.delete_FarlieGumbelMorgensternCopula

# Register FarlieGumbelMorgensternCopula in _model_copula2:
_model_copula2.FarlieGumbelMorgensternCopula_swigregister(FarlieGumbelMorgensternCopula)
class FarlieGumbelMorgensternCopulaFactory(openturns.model_copula.DistributionFactoryImplementation):
    r"""
    Farlie Gumbel Morgenstern Copula factory.

    Notes
    -----
    We note :math:`\Hat{\tau}_n` the Kendall-\ :math:`\tau` of the sample
    and :math:`\Hat{\rho}_n` its Spearman correlation coefficient.

    We use the following estimators:

    .. math::

        \Hat{\theta}_n = \displaystyle \frac{9}{2}\Hat{\tau}_n^{\strut}` 

    if :math:`|\Hat{\theta}_n|<1`.

    Otherwise

    .. math::

        \Hat{\theta}_n = \displaystyle 3\Hat{\rho}_n^{\strut}`

    if :math:`|\Hat{\theta}_n|<1`.

    Otherwise, the estimation is not possible.


    See also
    --------
    DistributionFactory, FarlieGumbelMorgensternCopula
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

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

    def build(self, *args):
        r"""
        Build the distribution.

        **Available usages**:

            build()

            build(*sample*)

            build(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
            The parameters of the distribution.

        Returns
        -------
        dist : :class:`~openturns.Distribution`
            The estimated distribution.

            In the first usage, the default native distribution is built.
        """
        return _model_copula2.FarlieGumbelMorgensternCopulaFactory_build(self, *args)

    def buildAsFarlieGumbelMorgensternCopula(self, *args):
        r"""
        Estimate the copula as native copula.

        **Available usages**:

            buildAsFarlieGumbelMorgensternCopula()

            buildAsFarlieGumbelMorgensternCopula(*sample*)

            buildAsFarlieGumbelMorgensternCopula(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data of dimension 2.
        param : sequence of float
           The parameter :math:`\theta`.

        Returns
        -------
        copula : :class:`~openturns.FarlieGumbelMorgensternCopula`
            The estimated copula as a FarlieGumbelMorgenstern copula.

            In the first usage, the default FarlieGumbelMorgenstern copula is built.
        """
        return _model_copula2.FarlieGumbelMorgensternCopulaFactory_buildAsFarlieGumbelMorgensternCopula(self, *args)

    def __init__(self, *args):
        _model_copula2.FarlieGumbelMorgensternCopulaFactory_swiginit(self, _model_copula2.new_FarlieGumbelMorgensternCopulaFactory(*args))
    __swig_destroy__ = _model_copula2.delete_FarlieGumbelMorgensternCopulaFactory

# Register FarlieGumbelMorgensternCopulaFactory in _model_copula2:
_model_copula2.FarlieGumbelMorgensternCopulaFactory_swigregister(FarlieGumbelMorgensternCopulaFactory)
class FrankCopula(openturns.model_copula.ArchimedeanCopula):
    r"""
    Frank copula.

    The Frank copula is a bivariate symmetric Archimedean copula defined by:

    .. math::

        C(u_1, u_2) = -\frac{1}{\theta}
                      log \left( 1 +
                                 \frac{(e^{-\theta u_1} - 1)(e^{-\theta u_2} - 1)}
                                      {e^{-\theta} - 1}
                          \right)

    for :math:`(u_1, u_2) \in [0, 1]^2`

    And its generator is:

    .. math::

        \varphi(t) = -\log \left( \frac{e^{-\theta t}-1}{e^{-\theta}-1} \right)

    Parameters
    ----------
    theta : float, optional
        Parameter :math:`\theta`, :math:`\theta \in \Rset`.
        Default value is 2.0.

    See also
    --------
    ArchimedeanCopula

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> copula = ot.FrankCopula(2.5)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.FrankCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.FrankCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.FrankCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.FrankCopula_getRealization(self)

    def computeDDF(self, *args):
        r"""
        Compute the derivative density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            The input value where the conditional derivative density function must be evaluated.

        Returns
        -------
        ddf : :class:`~openturns.Point`, :class:`~openturns.Sample`
            DDF value at *x*.

        Notes
        -----
        The derivative density function is the gradient of the probability density
        function with respect to :math:`\vect{x}`:

        .. math::

            \vect{\nabla}_{\vect{x}} f_{\vect{X}}(\vect{x}) =
                \Tr{\left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_1},
                         \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_d}\right)},
                \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.FrankCopula_computeDDF(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.FrankCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.FrankCopula_computeCDF(self, *args)

    def getSpearmanCorrelation(self):
        r"""
        Accessor to the Spearman correlation matrix.

        Returns
        -------
        R : :class:`~openturns.CorrelationMatrix`
            Spearman's correlation matrix.

        Notes
        -----
        Spearman's (rank) correlation is defined as the normalized covariance matrix
        of the copula (ie that of the uniform margins):

        .. math::

            \mat{\rho_S} = \left[\frac{\Cov{F_{X_i}(X_i), F_{X_j}(X_j)}}
                                      {\sqrt{\Var{F_{X_i}(X_i)} \Var{F_{X_j}(X_j)}}},
                                 \quad i,j = 1, \ldots, d\right]

        See Also
        --------
        getKendallTau
        """
        return _model_copula2.FrankCopula_getSpearmanCorrelation(self)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.FrankCopula_getKendallTau(self)

    def computePDFGradient(self, point):
        r"""
        Compute the gradient of the probability density function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dfdtheta : :class:`~openturns.Point`
            Partial derivatives of the PDF with respect to the distribution
            parameters at input *x*.

        Notes
        -----
        Let :math:`\vect{\theta}` be the vector of parameters of the distribution. Then
        the gradient of the probability density function :math:`f_{\vect{X}}` is defined by:

        .. math::

            \left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_1}, \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_d}\right)

        """
        return _model_copula2.FrankCopula_computePDFGradient(self, point)

    def computeCDFGradient(self, point):
        r"""
        Compute the gradient of the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dFdtheta : :class:`~openturns.Point`
            Partial derivatives of the CDF with respect to the distribution
            parameters at *x*.
        """
        return _model_copula2.FrankCopula_computeCDFGradient(self, point)

    def computeQuantile(self, *args):
        r"""
        Compute the quantile function.

        Parameters
        ----------
        p : float (or sequence of float), :math:`p \in [0, 1]`
            A probability.
        tail : bool, optional
            `True` indicates that the order considered is :math:`1-p`.
            Default value is `False`.

        Returns
        -------
        xp : :class:`~openturns.Point` (or :class:`~openturns.Sample`)
            If `tail=False`, the quantile of order :math:`p`.
            If `tail=True`, the quantile of order  :math:`1-p`.

        Notes
        -----
        If the underlying variable :math:`X` is scalar, then the quantile of order :math:`p`, denoted by :math:`x_p`,
        is defined as the generalized inverse of its cumulative distribution function:

        .. math::

             x_p  = F_X^{-1}(p) = \inf \{ x \in \Rset\, |\, F(x) \geq p \}, \quad 0 \leq p \leq 1.

        If the distribution is scalar and discrete, then the quantile of order :math:`p=0` is defined by:

        .. math::

            x_0 = \sup \{ x \in \Rset \, |\, F(x) = 0 \}.

        If the underlying variable :math:`\vect{X} = (X_1, \dots, X_d)` is of dimension :math:`d>1`, then
        the quantile of order :math:`p`, denoted by :math:`\vect{x}_p \in \Rset^d`, is such that:

        .. math::

            \begin{aligned}
                F_{\vect{X}}(\vect{x}_p) & =  p \\    
                F_{X_i}(\vect{x}_{p,i}) & =  F_{X_j}(\vect{x}_{p,j}) \quad \forall (i,j)
            \end{aligned}

        where :math:`F_{X_i}` is the :math:`i`-th marginal cdf. The last condition means that the quantile of order :math:`p`
        is such that all the components are associated to the same order of quantile of their margin.

        """
        return _model_copula2.FrankCopula_computeQuantile(self, *args)

    def computeConditionalCDF(self, *args):
        r"""
        Compute the conditional cumulative distribution function.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        p : float, sequence of float
            Conditional CDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional cumulative distribution function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})` is defined by:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
                \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.FrankCopula_computeConditionalCDF(self, *args)

    def computeConditionalQuantile(self, *args):
        r"""
        Compute the conditional quantile function of the last component.

        Conditional quantile with respect to the other fixed components.

        Parameters
        ----------
        p : float, sequence of float, :math:`p \in [0, 1]`
            Conditional quantile.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        xj : float
            Conditional quantile of order *p* of the component :math:`X_j`
            given that the components of indices :math:`k \leq j-1` are fixed and
            equal to *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional quantile of order :math:`p` of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p; x_1, \dots, x_{j-1})

        where :math:`F^{-1}` is the quantile function.
        For :math:`j=1`, it
        reduces to :math:`F^{-1}_{X_1}(p)`.

        See Also
        --------
        computeQuantile, computeConditionalCDF
        """
        return _model_copula2.FrankCopula_computeConditionalQuantile(self, *args)

    def computeArchimedeanGenerator(self, t):
        r"""
        Compute the Archimedean generator :math:`\varphi`.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.FrankCopula_computeArchimedeanGenerator(self, t)

    def computeInverseArchimedeanGenerator(self, t):
        r"""
        Compute the inverse of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
             :math:`\varphi^{-1}` the inverse of the Archimedean generator.
        """
        return _model_copula2.FrankCopula_computeInverseArchimedeanGenerator(self, t)

    def computeArchimedeanGeneratorDerivative(self, t):
        r"""
        Compute the derivative of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The derivative of the Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.FrankCopula_computeArchimedeanGeneratorDerivative(self, t)

    def computeArchimedeanGeneratorSecondDerivative(self, t):
        r"""
        Compute the seconde derivative of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The seconde derivative of the Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.FrankCopula_computeArchimedeanGeneratorSecondDerivative(self, t)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.FrankCopula_hasIndependentCopula(self)

    def computeEntropy(self):
        r"""
        Compute the entropy of the distribution.

        Returns
        -------
        e : float
            Entropy of the distribution.

        Notes
        -----
        The entropy of a distribution is defined by:

        .. math::

            \cE_X = \Expect{-\log(p_X(\vect{X}))}

        Where the random vector :math:`\vect{X}` follows the probability
        distribution of interest, and :math:`p_X` is either the *probability
        density function* of :math:`\vect{X}` if it is continuous or the
        *probability distribution function* if it is discrete.

        """
        return _model_copula2.FrankCopula_computeEntropy(self)

    def computeUpperTailDependenceMatrix(self):
        r"""
        Compute the upper tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that its copula is
        denoted by :math:`C`.
        The upper tail dependence matrix is :math:`(\chi^{ij})_{1 \leq i, j \leq d}` where :math:`\chi^{ij}` is
        the upper tail dependence coefficient of the bivariate distribution :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi^{ij} = \lim_{u \to 1} \chi^{ij}(u)

        where  :math:`u \mapsto \chi^{ij}(u)` is the upper tail dependence function of the bivariate distribution
        :math:`(X_i, X_j)` defined by:

        .. math::

            \chi(u) = 2 - \frac{\log C(u,u)}{\log u}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chi = copula.computeUpperTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.FrankCopula_computeUpperTailDependenceMatrix(self)

    def computeLowerTailDependenceMatrix(self):
        r"""
        Compute the lower tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that
        its copula is denoted by :math:`C`.
        The lower tail dependence matrix is :math:`(\chi_L^{ij})_{1 \leq i, j \leq d}` where
        :math:`\chi_L^{ij}` is the lower tail dependence coefficient of the bivariate distribution
        :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi_L^{ij} = \lim_{u \to 0} \chi_L^{ij}(u)

        where  :math:`u \mapsto \chi_L^{ij}(u)` is the lower tail dependence function of the bivariate
        distribution :math:`(X_i, X_j)` defined by:

        .. math::

            \chi_L(u) = \frac{\log (1 - C(u,u))}{\log (1-u)}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chiL = copula.computeLowerTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.FrankCopula_computeLowerTailDependenceMatrix(self)

    def setParameter(self, parameter):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameter : sequence of float
            Parameter values.
        """
        return _model_copula2.FrankCopula_setParameter(self, parameter)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.FrankCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.FrankCopula_getParameterDescription(self)

    def setTheta(self, theta):
        r"""
        Set the parameter :math:`\theta`.

        Parameters
        ----------
        theta : float
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.FrankCopula_setTheta(self, theta)

    def getTheta(self):
        r"""
        Get the parameter :math:`\theta`.

        Returns
        -------
        theta : float
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.FrankCopula_getTheta(self)

    def __init__(self, *args):
        _model_copula2.FrankCopula_swiginit(self, _model_copula2.new_FrankCopula(*args))
    __swig_destroy__ = _model_copula2.delete_FrankCopula

# Register FrankCopula in _model_copula2:
_model_copula2.FrankCopula_swigregister(FrankCopula)
class FrankCopulaFactory(openturns.model_copula.DistributionFactoryImplementation):
    r"""
    Frank Copula factory.

    Notes
    -----
    The parameters are estimated using the following equations:

    :math:`\Hat{\theta}_n` is solution of

    .. math::

        \displaystyle \Hat{\tau}_n = 1-4\left( \frac{1-D(\Hat{\theta}_n, 1)^{\strut}}{\theta} \right)

    where :math:`D` is the Debye function defined as

    .. math::

        \displaystyle D(x, n)=\frac{n}{x^n}\int_0^x \frac{t^n}{e^t-1_{\strut}} dt

    See also
    --------
    DistributionFactory, FrankCopula
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

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

    def build(self, *args):
        r"""
        Build the distribution.

        **Available usages**:

            build()

            build(*sample*)

            build(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
            The parameters of the distribution.

        Returns
        -------
        dist : :class:`~openturns.Distribution`
            The estimated distribution.

            In the first usage, the default native distribution is built.
        """
        return _model_copula2.FrankCopulaFactory_build(self, *args)

    def buildAsFrankCopula(self, *args):
        r"""
        Estimate the copula as native copula.

        **Available usages**:

            buildAsFrankCopula()

            buildAsFrankCopula(*sample*)

            buildAsFrankCopula(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data of dimension 2.
        param : sequence of float of size 1
           The parameter :math:`\theta`.

        Returns
        -------
        copula : :class:`~openturns.FrankCopula`
            The estimated copula as a Frank copula.

            In the first usage, the default Frank copula is built.
        """
        return _model_copula2.FrankCopulaFactory_buildAsFrankCopula(self, *args)

    def __init__(self, *args):
        _model_copula2.FrankCopulaFactory_swiginit(self, _model_copula2.new_FrankCopulaFactory(*args))
    __swig_destroy__ = _model_copula2.delete_FrankCopulaFactory

# Register FrankCopulaFactory in _model_copula2:
_model_copula2.FrankCopulaFactory_swigregister(FrankCopulaFactory)
class IndependentCopula(openturns.model_copula.DistributionImplementation):
    r"""
    Independent copula.

    The Independent copula is defined by:

    .. math::

        C(u_1, \cdots, u_n) = \prod_{i=1}^n u_i

    for :math:`u_i \in [0, 1]`

    Parameters
    ----------
    n : int
        Dimension of the copula, :math:`n \geq 1`.
        Default value is 2.

    See also
    --------
    Distribution

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> copula = ot.IndependentCopula(3)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.IndependentCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.IndependentCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.IndependentCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.IndependentCopula_getRealization(self)

    def computeDDF(self, *args):
        r"""
        Compute the derivative density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            The input value where the conditional derivative density function must be evaluated.

        Returns
        -------
        ddf : :class:`~openturns.Point`, :class:`~openturns.Sample`
            DDF value at *x*.

        Notes
        -----
        The derivative density function is the gradient of the probability density
        function with respect to :math:`\vect{x}`:

        .. math::

            \vect{\nabla}_{\vect{x}} f_{\vect{X}}(\vect{x}) =
                \Tr{\left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_1},
                         \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_d}\right)},
                \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.IndependentCopula_computeDDF(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.IndependentCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.IndependentCopula_computeCDF(self, *args)

    def computeProbability(self, interval):
        r"""
        Compute the interval probability.

        Parameters
        ----------
        interval : :class:`~openturns.Interval`
            An interval in :math:`\Rset^d`.

        Returns
        -------
        p : float
            The probability of *interval*.

        Notes
        -----
        This computes the probability that the random vector :math:`\vect{X}` lies in :math:`interval`.

        If the interval is rectangular, i.e. if :math:`I = \bigcap\limits_{i=1}^d [a_i, b_i]`, then we have:

        .. math::

            \Prob{\vect{X} \in I} = \sum\limits_{\vect{c}} (-1)^{n(\vect{c})}
                    F_{\vect{X}}\left(\vect{c}\right)

        where the sum runs over the :math:`2^d` vectors such that
        :math:`\vect{c} = \Tr{(c_i, i = 1, \ldots, d)}` with :math:`c_i \in \{a_i, b_i\}`,
        and :math:`n(\vect{c})` is the number of components in
        :math:`\vect{c}` such that :math:`c_i = a_i`.
        """
        return _model_copula2.IndependentCopula_computeProbability(self, interval)

    def computeSurvivalFunction(self, *args):
        r"""
        Compute the survival function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        s : float, :class:`~openturns.Point`
            Value of the survival function at point *x*.

        Notes
        -----
        The survival function of the random vector :math:`\vect{X}` of dimension :math:`d` is defined as follows:

        .. math::

            S_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i = 1}^d \left\{X_i > x_i \right\}}, \qquad \vect{x} \in \Rset^d

        .. warning::

            This is not the complementary cumulative distribution function except for
            scalar distributions.

        See Also
        --------
        computeComplementaryCDF
        """
        return _model_copula2.IndependentCopula_computeSurvivalFunction(self, *args)

    def computeEntropy(self):
        r"""
        Compute the entropy of the distribution.

        Returns
        -------
        e : float
            Entropy of the distribution.

        Notes
        -----
        The entropy of a distribution is defined by:

        .. math::

            \cE_X = \Expect{-\log(p_X(\vect{X}))}

        Where the random vector :math:`\vect{X}` follows the probability
        distribution of interest, and :math:`p_X` is either the *probability
        density function* of :math:`\vect{X}` if it is continuous or the
        *probability distribution function* if it is discrete.

        """
        return _model_copula2.IndependentCopula_computeEntropy(self)

    def computeMinimumVolumeIntervalWithMarginalProbability(self, prob):
        r"""
        Compute the confidence interval with minimum volume.

        Refer to :func:`computeMinimumVolumeInterval()`

        Parameters
        ----------
        alpha : float, :math:`\alpha \in [0,1]`
            The confidence level.

        Returns
        -------
        confInterval : :class:`~openturns.Interval`
            The confidence interval of level *alpha*.
        marginalProb : float
            The value :math:`\beta` which is the common marginal probability of each marginal interval.

        Examples
        --------
        Create a sample from a Normal distribution:

        >>> import openturns as ot
        >>> sample = ot.Normal().getSample(10)
        >>> ot.ResourceMap.SetAsUnsignedInteger('DistributionFactory-DefaultBootstrapSize', 100)

        Fit a Normal distribution and extract the asymptotic parameters distribution:

        >>> fittedRes = ot.NormalFactory().buildEstimator(sample)
        >>> paramDist = fittedRes.getParameterDistribution()

        Determine the confidence interval of the native parameters at level 0.9 with minimum volume:

        >>> ot.ResourceMap.SetAsUnsignedInteger('Distribution-MinimumVolumeLevelSetSamplingSize', 1000)
        >>> confInt, marginalProb = paramDist.computeMinimumVolumeIntervalWithMarginalProbability(0.9)
        >>> ot.ResourceMap.Reset()

        """
        return _model_copula2.IndependentCopula_computeMinimumVolumeIntervalWithMarginalProbability(self, prob)

    def computeBilateralConfidenceIntervalWithMarginalProbability(self, prob):
        r"""
        Compute a bilateral confidence interval.

        Refer to :func:`computeBilateralConfidenceInterval()`

        Parameters
        ----------
        alpha : float, :math:`\alpha \in [0,1]`
            The confidence level.

        Returns
        -------
        confInterval : :class:`~openturns.Interval`
            The confidence interval of level *\alpha*.
        beta : float
            The probability :math:`\beta`.

        Notes
        -----
        Refer to :func:`computeBilateralConfidenceInterval()`. In addition to the confidence interval,
        the method returns the probability :math:`\beta`.

        Examples
        --------
        We consider a Normal(2) distribution with zero mean, unit standard deviation and independent components.
        We note :math:`\Phi_2` its cdf. Due to
        symetries of the distribution, the bilateral confidence interval is :math:`I^*_{\alpha} = [-a, a] \times [-a, a]`
        where :math:`a = \Phi^{-1}((1 + \beta) / 2)` where :math:`\Phi` is the marginal cdf of each 1D marginal standard Gaussian component. Then :math:`\beta` is such that
        :math:`\Phi_2(I^*_{\alpha}) = \alpha`. As :math:`\Phi_2(I^*_{\alpha}) = (2\Phi(a) - 1)^2 = \beta^2`,
        then, :math:`\beta` is equal to :math:`\beta = \sqrt{\alpha} = 0.9486`
        and :math:`a = -1.9488` with 4 significant digits.

        >>> import openturns as ot
        >>> dist = ot.Normal(2)
        >>> confInt, beta = dist.computeBilateralConfidenceIntervalWithMarginalProbability(0.9)

        """
        return _model_copula2.IndependentCopula_computeBilateralConfidenceIntervalWithMarginalProbability(self, prob)

    def computeMinimumVolumeLevelSetWithThreshold(self, prob):
        r"""
        Compute the confidence domain with minimum volume.

        Refer to :func:`computeMinimumVolumeLevelSet()`

        Parameters
        ----------
        alpha : float, :math:`\alpha \in [0,1]`
            The confidence level.

        Returns
        -------
        levelSet : :class:`~openturns.LevelSet`
            The minimum volume domain of measure *alpha*.
        level : float
            The value :math:`p_{\alpha}` of the density function defining the frontier of the domain.

        Examples
        --------
        Create a sample from a Normal distribution:

        >>> import openturns as ot
        >>> sample = ot.Normal().getSample(10)
        >>> ot.ResourceMap.SetAsUnsignedInteger('DistributionFactory-DefaultBootstrapSize', 100)

        Fit a Normal distribution and extract the asymptotic parameters distribution:

        >>> fittedRes = ot.NormalFactory().buildEstimator(sample)
        >>> paramDist = fittedRes.getParameterDistribution()

        Determine the confidence region of minimum volume of the native parameters at level 0.9 with PDF threshold:

        >>> levelSet, threshold = paramDist.computeMinimumVolumeLevelSetWithThreshold(0.9)

        """
        return _model_copula2.IndependentCopula_computeMinimumVolumeLevelSetWithThreshold(self, prob)

    def computePDFGradient(self, point):
        r"""
        Compute the gradient of the probability density function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dfdtheta : :class:`~openturns.Point`
            Partial derivatives of the PDF with respect to the distribution
            parameters at input *x*.

        Notes
        -----
        Let :math:`\vect{\theta}` be the vector of parameters of the distribution. Then
        the gradient of the probability density function :math:`f_{\vect{X}}` is defined by:

        .. math::

            \left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_1}, \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_d}\right)

        """
        return _model_copula2.IndependentCopula_computePDFGradient(self, point)

    def computeCDFGradient(self, point):
        r"""
        Compute the gradient of the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dFdtheta : :class:`~openturns.Point`
            Partial derivatives of the CDF with respect to the distribution
            parameters at *x*.
        """
        return _model_copula2.IndependentCopula_computeCDFGradient(self, point)

    def computeQuantile(self, *args):
        r"""
        Compute the quantile function.

        Parameters
        ----------
        p : float (or sequence of float), :math:`p \in [0, 1]`
            A probability.
        tail : bool, optional
            `True` indicates that the order considered is :math:`1-p`.
            Default value is `False`.

        Returns
        -------
        xp : :class:`~openturns.Point` (or :class:`~openturns.Sample`)
            If `tail=False`, the quantile of order :math:`p`.
            If `tail=True`, the quantile of order  :math:`1-p`.

        Notes
        -----
        If the underlying variable :math:`X` is scalar, then the quantile of order :math:`p`, denoted by :math:`x_p`,
        is defined as the generalized inverse of its cumulative distribution function:

        .. math::

             x_p  = F_X^{-1}(p) = \inf \{ x \in \Rset\, |\, F(x) \geq p \}, \quad 0 \leq p \leq 1.

        If the distribution is scalar and discrete, then the quantile of order :math:`p=0` is defined by:

        .. math::

            x_0 = \sup \{ x \in \Rset \, |\, F(x) = 0 \}.

        If the underlying variable :math:`\vect{X} = (X_1, \dots, X_d)` is of dimension :math:`d>1`, then
        the quantile of order :math:`p`, denoted by :math:`\vect{x}_p \in \Rset^d`, is such that:

        .. math::

            \begin{aligned}
                F_{\vect{X}}(\vect{x}_p) & =  p \\    
                F_{X_i}(\vect{x}_{p,i}) & =  F_{X_j}(\vect{x}_{p,j}) \quad \forall (i,j)
            \end{aligned}

        where :math:`F_{X_i}` is the :math:`i`-th marginal cdf. The last condition means that the quantile of order :math:`p`
        is such that all the components are associated to the same order of quantile of their margin.

        """
        return _model_copula2.IndependentCopula_computeQuantile(self, *args)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.IndependentCopula_getKendallTau(self)

    def getMarginal(self, *args):
        r"""
        Accessor to marginal distributions.

        Parameters
        ----------
        i : int or list of ints, :math:`0 \leq i < d`
            Component(s) indice(s).

        Returns
        -------
        distribution : :class:`~openturns.Distribution`
            The marginal distribution of the selected component(s).
        """
        return _model_copula2.IndependentCopula_getMarginal(self, *args)

    def computeConditionalDDF(self, x, y):
        r"""
        Compute the conditional derivative density function of the last component.

        With respect to the other fixed components.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        ddf : float,
            Conditional DDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional derivative density function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             \dfrac{d^2}{d\,x_j^2}F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1})

        where for :math:`2 \leq j \leq d`:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
            \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it reduces to :math:`\dfrac{d^2}{d\,x_1^2}F_{X_1}(x_1)`, ie the DDF of
        the first component at :math:`x_1`.

        See Also
        --------
        computeDDF, computeConditionalCDF
        """
        return _model_copula2.IndependentCopula_computeConditionalDDF(self, x, y)

    def computeConditionalPDF(self, *args):
        r"""
        Compute the conditional probability density function.

        Conditional PDF of the last component with respect to the other fixed components.

        Parameters
        ----------
        xj : float, sequence of float, 
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        cpdf : float, sequence of float
            Conditional PDF at *xd*, given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional probability density function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             \dfrac{d}{d\,x_j}F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1})

        where for :math:`2 \leq j \leq d`:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
            \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`\dfrac{d}{d\,x_1}F_{X_1}(x_1)`.

        See Also
        --------
        computePDF, computeConditionalCDF
        """
        return _model_copula2.IndependentCopula_computeConditionalPDF(self, *args)

    def computeConditionalCDF(self, *args):
        r"""
        Compute the conditional cumulative distribution function.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        p : float, sequence of float
            Conditional CDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional cumulative distribution function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})` is defined by:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
                \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.IndependentCopula_computeConditionalCDF(self, *args)

    def computeConditionalQuantile(self, *args):
        r"""
        Compute the conditional quantile function of the last component.

        Conditional quantile with respect to the other fixed components.

        Parameters
        ----------
        p : float, sequence of float, :math:`p \in [0, 1]`
            Conditional quantile.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        xj : float
            Conditional quantile of order *p* of the component :math:`X_j`
            given that the components of indices :math:`k \leq j-1` are fixed and
            equal to *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional quantile of order :math:`p` of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p; x_1, \dots, x_{j-1})

        where :math:`F^{-1}` is the quantile function.
        For :math:`j=1`, it
        reduces to :math:`F^{-1}_{X_1}(p)`.

        See Also
        --------
        computeQuantile, computeConditionalCDF
        """
        return _model_copula2.IndependentCopula_computeConditionalQuantile(self, *args)

    def getIsoProbabilisticTransformation(self):
        r"""
        Accessor to the iso-probabilistic transformation.

        Refer to :any:`isoprobabilistic_transformation`.

        Returns
        -------
        T : :class:`~openturns.Function`
            Iso-probabilistic transformation.

        Notes
        -----
        The iso-probabilistic transformation is defined as follows:

        .. math::

            T: \left|\begin{array}{rcl}
                    \supp{\vect{X}} & \rightarrow & \Rset^n \\
                    \vect{x} & \mapsto & \vect{u}
               \end{array}\right.

        An iso-probabilistic transformation is a *diffeomorphism* [#diff]_ from
        :math:`\supp{\vect{X}}` to :math:`\Rset^d` that maps realizations
        :math:`\vect{x}` of a random vector :math:`\vect{X}` into realizations
        :math:`\vect{y}` of another random vector :math:`\vect{Y}` while
        preserving probabilities. It is hence defined so that it satisfies:

        .. math::
            :nowrap:

            \begin{eqnarray*}
                \Prob{\bigcap_{i=1}^d X_i \leq x_i}
                    & = & \Prob{\bigcap_{i=1}^d Y_i \leq y_i} \\
                F_{\vect{X}}(\vect{x})
                    & = & F_{\vect{Y}}(\vect{y})
            \end{eqnarray*}

        **The present** implementation of the iso-probabilistic transformation maps
        realizations :math:`\vect{x}` into realizations :math:`\vect{u}` of a
        random vector :math:`\vect{U}` with *spherical distribution* [#spherical]_.
        To be more specific:

            - if the distribution is elliptical, then the transformed distribution is
              simply made spherical using the **Nataf (linear) transformation**.
            - if the distribution has an elliptical Copula, then the transformed
              distribution is made spherical using the **generalized Nataf
              transformation**.
            - otherwise, the transformed distribution is the standard multivariate
              Normal distribution and is obtained by means of the **Rosenblatt
              transformation**.

        .. [#diff] A differentiable map :math:`f` is called a *diffeomorphism* if it
            is a bijection and its inverse :math:`f^{-1}` is differentiable as well.
            Hence, the iso-probabilistic transformation implements a gradient (and
            even a Hessian).

        .. [#spherical] A distribution is said to be *spherical* if it is invariant by
            rotation. Mathematically, :math:`\vect{U}` has a spherical distribution
            if:

            .. math::

                \mat{Q}\,\vect{U} \sim \vect{U},
                \quad \forall \mat{Q} \in \cO_n(\Rset)

        See also
        --------
        openturns.Distribution.getInverseIsoProbabilisticTransformation
        openturns.Distribution.isElliptical
        openturns.Distribution.hasEllipticalCopula
        """
        return _model_copula2.IndependentCopula_getIsoProbabilisticTransformation(self)

    def getInverseIsoProbabilisticTransformation(self):
        r"""
        Accessor to the inverse iso-probabilistic transformation.

        Returns
        -------
        Tinv : :class:`~openturns.Function`
            Inverse iso-probabilistic transformation.

        Notes
        -----
        The inverse iso-probabilistic transformation is defined as follows:

        .. math::

            T^{-1}: \left|\begin{array}{rcl}
                        \Rset^n & \rightarrow & \supp{\vect{X}} \\
                        \vect{u} & \mapsto & \vect{x}
                    \end{array}\right.

        See also
        --------
        openturns.Distribution.getIsoProbabilisticTransformation
        """
        return _model_copula2.IndependentCopula_getInverseIsoProbabilisticTransformation(self)

    def isElliptical(self):
        r"""
        Test whether the distribution is elliptical or not.

        Returns
        -------
        test : bool
            Answer.

        Notes
        -----
        A multivariate distribution is said to be *elliptical* if its characteristic
        function is of the form:

        .. math::

            \phi(\vect{t}) = \exp\left(i \Tr{\vect{t}} \vect{\mu}\right)
                             \Psi\left(\Tr{\vect{t}} \mat{\Sigma} \vect{t}\right),
                             \quad \vect{t} \in \Rset^d

        for specified vector :math:`\vect{\mu}` and positive-definite matrix
        :math:`\mat{\Sigma}`. The function :math:`\Psi` is known as the
        *characteristic generator* of the elliptical distribution.
        """
        return _model_copula2.IndependentCopula_isElliptical(self)

    def hasEllipticalCopula(self):
        r"""
        Test whether the copula of the distribution is elliptical or not.

        Returns
        -------
        test : bool
            Answer.

        See Also
        --------
        isElliptical
        """
        return _model_copula2.IndependentCopula_hasEllipticalCopula(self)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.IndependentCopula_hasIndependentCopula(self)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.IndependentCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.IndependentCopula_getParameterDescription(self)

    def __init__(self, *args):
        _model_copula2.IndependentCopula_swiginit(self, _model_copula2.new_IndependentCopula(*args))
    __swig_destroy__ = _model_copula2.delete_IndependentCopula

# Register IndependentCopula in _model_copula2:
_model_copula2.IndependentCopula_swigregister(IndependentCopula)
class IndependentCopulaFactory(openturns.model_copula.DistributionFactoryImplementation):
    r"""
    Independent Copula factory.


    See also
    --------
    DistributionFactory, IndependentCopula
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

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

    def build(self, *args):
        r"""
        Build the distribution.

        **Available usages**:

            build()

            build(*sample*)

            build(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
            The parameters of the distribution.

        Returns
        -------
        dist : :class:`~openturns.Distribution`
            The estimated distribution.

            In the first usage, the default native distribution is built.
        """
        return _model_copula2.IndependentCopulaFactory_build(self, *args)

    def buildAsIndependentCopula(self, *args):
        r"""
        Build the independent copula.

        **Available usages**:

            buildAsIndependentCopula()

            buildAsIndependentCopula(*sample*)

            buildAsIndependentCopula(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float, of dimension :math:`d`
            The sample of size :math:`n>0` from which the copula is estimated.
        param : sequence of float
            The dimension of the IndependentCopula.

        Returns
        -------
        copula : :class:`~openturns.IndependentCopula`
            The estimated copula as an independent copula.

        """
        return _model_copula2.IndependentCopulaFactory_buildAsIndependentCopula(self, *args)

    def __init__(self, *args):
        _model_copula2.IndependentCopulaFactory_swiginit(self, _model_copula2.new_IndependentCopulaFactory(*args))
    __swig_destroy__ = _model_copula2.delete_IndependentCopulaFactory

# Register IndependentCopulaFactory in _model_copula2:
_model_copula2.IndependentCopulaFactory_swigregister(IndependentCopulaFactory)
class GumbelCopula(openturns.model_copula.ArchimedeanCopula):
    r"""
    Gumbel copula.

    The Gumbel copula is a bivariate asymmetric Archimedean copula, exhibiting
    greater dependence in the positive tail than in the negative. It is defined by:

    .. math::

        C(u_1, u_2) = \exp(-((-log(u_1))^{\theta} + (-log(u_2))^{\theta}))^{1/\theta})

    for :math:`(u_1, u_2) \in [0, 1]^2`

    And its generator is:

    .. math::

        \varphi(t) = (-\log(t))^{\theta}

    Parameters
    ----------
    theta : float, optional
        Parameter :math:`\theta`, :math:`\theta \geq 1`.
        Default value is 2.0.

    See also
    --------
    ArchimedeanCopula

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> copula = ot.GumbelCopula(2.5)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.GumbelCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.GumbelCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.GumbelCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.GumbelCopula_getRealization(self)

    def computeDDF(self, *args):
        r"""
        Compute the derivative density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            The input value where the conditional derivative density function must be evaluated.

        Returns
        -------
        ddf : :class:`~openturns.Point`, :class:`~openturns.Sample`
            DDF value at *x*.

        Notes
        -----
        The derivative density function is the gradient of the probability density
        function with respect to :math:`\vect{x}`:

        .. math::

            \vect{\nabla}_{\vect{x}} f_{\vect{X}}(\vect{x}) =
                \Tr{\left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_1},
                         \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_d}\right)},
                \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.GumbelCopula_computeDDF(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.GumbelCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.GumbelCopula_computeCDF(self, *args)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.GumbelCopula_getKendallTau(self)

    def computePDFGradient(self, point):
        r"""
        Compute the gradient of the probability density function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dfdtheta : :class:`~openturns.Point`
            Partial derivatives of the PDF with respect to the distribution
            parameters at input *x*.

        Notes
        -----
        Let :math:`\vect{\theta}` be the vector of parameters of the distribution. Then
        the gradient of the probability density function :math:`f_{\vect{X}}` is defined by:

        .. math::

            \left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_1}, \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_d}\right)

        """
        return _model_copula2.GumbelCopula_computePDFGradient(self, point)

    def computeCDFGradient(self, point):
        r"""
        Compute the gradient of the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dFdtheta : :class:`~openturns.Point`
            Partial derivatives of the CDF with respect to the distribution
            parameters at *x*.
        """
        return _model_copula2.GumbelCopula_computeCDFGradient(self, point)

    def computeQuantile(self, *args):
        r"""
        Compute the quantile function.

        Parameters
        ----------
        p : float (or sequence of float), :math:`p \in [0, 1]`
            A probability.
        tail : bool, optional
            `True` indicates that the order considered is :math:`1-p`.
            Default value is `False`.

        Returns
        -------
        xp : :class:`~openturns.Point` (or :class:`~openturns.Sample`)
            If `tail=False`, the quantile of order :math:`p`.
            If `tail=True`, the quantile of order  :math:`1-p`.

        Notes
        -----
        If the underlying variable :math:`X` is scalar, then the quantile of order :math:`p`, denoted by :math:`x_p`,
        is defined as the generalized inverse of its cumulative distribution function:

        .. math::

             x_p  = F_X^{-1}(p) = \inf \{ x \in \Rset\, |\, F(x) \geq p \}, \quad 0 \leq p \leq 1.

        If the distribution is scalar and discrete, then the quantile of order :math:`p=0` is defined by:

        .. math::

            x_0 = \sup \{ x \in \Rset \, |\, F(x) = 0 \}.

        If the underlying variable :math:`\vect{X} = (X_1, \dots, X_d)` is of dimension :math:`d>1`, then
        the quantile of order :math:`p`, denoted by :math:`\vect{x}_p \in \Rset^d`, is such that:

        .. math::

            \begin{aligned}
                F_{\vect{X}}(\vect{x}_p) & =  p \\    
                F_{X_i}(\vect{x}_{p,i}) & =  F_{X_j}(\vect{x}_{p,j}) \quad \forall (i,j)
            \end{aligned}

        where :math:`F_{X_i}` is the :math:`i`-th marginal cdf. The last condition means that the quantile of order :math:`p`
        is such that all the components are associated to the same order of quantile of their margin.

        """
        return _model_copula2.GumbelCopula_computeQuantile(self, *args)

    def computeConditionalCDF(self, *args):
        r"""
        Compute the conditional cumulative distribution function.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        p : float, sequence of float
            Conditional CDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional cumulative distribution function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})` is defined by:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
                \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.GumbelCopula_computeConditionalCDF(self, *args)

    def computeConditionalQuantile(self, *args):
        r"""
        Compute the conditional quantile function of the last component.

        Conditional quantile with respect to the other fixed components.

        Parameters
        ----------
        p : float, sequence of float, :math:`p \in [0, 1]`
            Conditional quantile.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        xj : float
            Conditional quantile of order *p* of the component :math:`X_j`
            given that the components of indices :math:`k \leq j-1` are fixed and
            equal to *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional quantile of order :math:`p` of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p; x_1, \dots, x_{j-1})

        where :math:`F^{-1}` is the quantile function.
        For :math:`j=1`, it
        reduces to :math:`F^{-1}_{X_1}(p)`.

        See Also
        --------
        computeQuantile, computeConditionalCDF
        """
        return _model_copula2.GumbelCopula_computeConditionalQuantile(self, *args)

    def computeArchimedeanGenerator(self, t):
        r"""
        Compute the Archimedean generator :math:`\varphi`.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.GumbelCopula_computeArchimedeanGenerator(self, t)

    def computeInverseArchimedeanGenerator(self, t):
        r"""
        Compute the inverse of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
             :math:`\varphi^{-1}` the inverse of the Archimedean generator.
        """
        return _model_copula2.GumbelCopula_computeInverseArchimedeanGenerator(self, t)

    def computeArchimedeanGeneratorDerivative(self, t):
        r"""
        Compute the derivative of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The derivative of the Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.GumbelCopula_computeArchimedeanGeneratorDerivative(self, t)

    def computeArchimedeanGeneratorSecondDerivative(self, t):
        r"""
        Compute the seconde derivative of the Archimedean generator.

        Parameters
        ----------
        t : float

        Returns
        -------
        result : float
            The seconde derivative of the Archimedean generator :math:`\varphi`.
        """
        return _model_copula2.GumbelCopula_computeArchimedeanGeneratorSecondDerivative(self, t)

    def computeUpperTailDependenceMatrix(self):
        r"""
        Compute the upper tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that its copula is
        denoted by :math:`C`.
        The upper tail dependence matrix is :math:`(\chi^{ij})_{1 \leq i, j \leq d}` where :math:`\chi^{ij}` is
        the upper tail dependence coefficient of the bivariate distribution :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi^{ij} = \lim_{u \to 1} \chi^{ij}(u)

        where  :math:`u \mapsto \chi^{ij}(u)` is the upper tail dependence function of the bivariate distribution
        :math:`(X_i, X_j)` defined by:

        .. math::

            \chi(u) = 2 - \frac{\log C(u,u)}{\log u}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chi = copula.computeUpperTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.GumbelCopula_computeUpperTailDependenceMatrix(self)

    def computeLowerTailDependenceMatrix(self):
        r"""
        Compute the lower tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that
        its copula is denoted by :math:`C`.
        The lower tail dependence matrix is :math:`(\chi_L^{ij})_{1 \leq i, j \leq d}` where
        :math:`\chi_L^{ij}` is the lower tail dependence coefficient of the bivariate distribution
        :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi_L^{ij} = \lim_{u \to 0} \chi_L^{ij}(u)

        where  :math:`u \mapsto \chi_L^{ij}(u)` is the lower tail dependence function of the bivariate
        distribution :math:`(X_i, X_j)` defined by:

        .. math::

            \chi_L(u) = \frac{\log (1 - C(u,u))}{\log (1-u)}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chiL = copula.computeLowerTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.GumbelCopula_computeLowerTailDependenceMatrix(self)

    def computeLowerExtremalDependenceMatrix(self):
        r"""
        Compute the lower extremal dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that
        its copula is denoted by :math:`C`.
        The lower extremal dependence matrix is :math:`(\bar{\chi}_L^{ij})_{1 \leq i, j \leq d}` where
        :math:`\\bar{\chi}_L^{ij}` is the lower extremal dependence coefficient of the bivariate distribution
        :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \bar{\chi}_L^{ij} = \lim_{u \to 0} \bar{\chi}_L^{ij}(u)

        where  :math:`u \mapsto \bar{\chi}_L^{ij}(u)` is the lower extremal dependence function
        of the bivariate distribution :math:`(X_i, X_j)` defined by:

        .. math::

            \bar{\chi}_L(u) = \frac{2 \log u}{\log C(u,u)} - 1, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chiLb = copula.computeLowerExtremalDependenceMatrix()[1, 0]
        """
        return _model_copula2.GumbelCopula_computeLowerExtremalDependenceMatrix(self)

    def setParameter(self, parameter):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameter : sequence of float
            Parameter values.
        """
        return _model_copula2.GumbelCopula_setParameter(self, parameter)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.GumbelCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.GumbelCopula_getParameterDescription(self)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.GumbelCopula_hasIndependentCopula(self)

    def setTheta(self, theta):
        r"""
        Set the parameter :math:`\theta`.

        Parameters
        ----------
        theta : float, :math:`\theta \geq 1`
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.GumbelCopula_setTheta(self, theta)

    def getTheta(self):
        r"""
        Get the parameter :math:`\theta`.

        Returns
        -------
        theta : float
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.GumbelCopula_getTheta(self)

    def __init__(self, *args):
        _model_copula2.GumbelCopula_swiginit(self, _model_copula2.new_GumbelCopula(*args))
    __swig_destroy__ = _model_copula2.delete_GumbelCopula

# Register GumbelCopula in _model_copula2:
_model_copula2.GumbelCopula_swigregister(GumbelCopula)
class GumbelCopulaFactory(openturns.model_copula.DistributionFactoryImplementation):
    r"""
    Gumbel Copula factory.

    Notes
    -----
    We note :math:`\Hat{\tau}_n` the Kendall-\ :math:`\tau` of the sample.

    We use the following estimator:

    .. math::
        :nowrap:

        \begin{eqnarray*}
          \displaystyle \Hat{\theta}_n=\frac{1^{\strut}}{1 - \Hat{\tau}_{n_{\strut}}}
        \end{eqnarray*}

    See also
    --------
    DistributionFactory, GumbelCopula
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

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

    def build(self, *args):
        r"""
        Build the distribution.

        **Available usages**:

            build()

            build(*sample*)

            build(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
            The parameters of the distribution.

        Returns
        -------
        dist : :class:`~openturns.Distribution`
            The estimated distribution.

            In the first usage, the default native distribution is built.
        """
        return _model_copula2.GumbelCopulaFactory_build(self, *args)

    def buildAsGumbelCopula(self, *args):
        r"""
        Estimate the copula as native copula.

        **Available usages**:

            buildAsGumbelCopula()

            buildAsGumbelCopula(*sample*)

            buildAsGumbelCopula(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float,
            Data of dimension 2.
        param : sequence of float of size 1,
           The parameter :math:`\theta`.

        Returns
        -------
        copula : :class:`~openturns.GumbelCopula`
            The estimated copula as a Gumbel copula.

            In the first usage, the default Gumbel copula is built.
        """
        return _model_copula2.GumbelCopulaFactory_buildAsGumbelCopula(self, *args)

    def __init__(self, *args):
        _model_copula2.GumbelCopulaFactory_swiginit(self, _model_copula2.new_GumbelCopulaFactory(*args))
    __swig_destroy__ = _model_copula2.delete_GumbelCopulaFactory

# Register GumbelCopulaFactory in _model_copula2:
_model_copula2.GumbelCopulaFactory_swigregister(GumbelCopulaFactory)
class MarshallOlkinCopula(openturns.model_copula.DistributionImplementation):
    r"""
    MarshallOlkin copula.

    The MarshallOlkin copula is a bivariate copula defined by:

    .. math::

        C(u_1, u_2) = 
        \begin{cases}
        u_1^{1-\alpha} u_2, \textrm{ if } u_1^\alpha \geq u_2^\beta \\
        u_1 u_2^{1-\beta}, \textrm{ otherwise.}
        \end{cases}

    for :math:`(u_1, u_2) \in [0, 1]^2`. 

    This copula is also known as the generalized Cuadras-Augé copula.

    Independence corresponds to :math:`\alpha = 0` or :math:`\beta = 0`.

    The minimum copula corresponds to :math:`\alpha = \beta = 1`.

    More details on this copula can be found in [nelsen2006]_, 
    chapter 3, section 3.1.1, page 52,
    or in [dobrolowski2014]_.

    Parameters
    ----------
    alpha : float
        Parameter :math:`\alpha`, :math:`0 \leq \alpha \leq 1`.
        Default value is 0.5.

    beta : float
        Parameter :math:`\beta`, :math:`0 \leq \beta \leq 1`.
        Default value is 0.5.

    Examples
    --------
    Create a Marshall-Olkin copula with default parameters:

    >>> import openturns as ot
    >>> copula = ot.MarshallOlkinCopula()

    Create a Marshall-Olkin copula:

    >>> import openturns as ot
    >>> copula = ot.MarshallOlkinCopula(0.3,0.7)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.MarshallOlkinCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.MarshallOlkinCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.MarshallOlkinCopula___str__(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.MarshallOlkinCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.MarshallOlkinCopula_computeCDF(self, *args)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.MarshallOlkinCopula_hasIndependentCopula(self)

    def setParameter(self, parameter):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameter : sequence of float
            Parameter values.
        """
        return _model_copula2.MarshallOlkinCopula_setParameter(self, parameter)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.MarshallOlkinCopula_getParameter(self)

    def setAlpha(self, alpha):
        r"""
        Set the parameter :math:`\alpha`.

        Parameters
        ----------
        alpha : float, :math:`0 \leq \alpha \leq 1`
            Parameter :math:`\alpha` of the copula.
        """
        return _model_copula2.MarshallOlkinCopula_setAlpha(self, alpha)

    def getAlpha(self):
        r"""
        Get the parameter :math:`\alpha`.

        Returns
        -------
        alpha : float
            Parameter :math:`\alpha` of the copula.
        """
        return _model_copula2.MarshallOlkinCopula_getAlpha(self)

    def setBeta(self, beta):
        r"""
        Set the parameter :math:`\beta`.

        Parameters
        ----------
        beta : float, :math:`0 \leq \beta \leq 1`
            Parameter :math:`\beta` of the copula.
        """
        return _model_copula2.MarshallOlkinCopula_setBeta(self, beta)

    def getBeta(self):
        r"""
        Get the parameter :math:`\beta`.

        Returns
        -------
        beta : float
            Parameter :math:`\beta` of the copula.
        """
        return _model_copula2.MarshallOlkinCopula_getBeta(self)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.MarshallOlkinCopula_getKendallTau(self)

    def getSpearmanCorrelation(self):
        r"""
        Accessor to the Spearman correlation matrix.

        Returns
        -------
        R : :class:`~openturns.CorrelationMatrix`
            Spearman's correlation matrix.

        Notes
        -----
        Spearman's (rank) correlation is defined as the normalized covariance matrix
        of the copula (ie that of the uniform margins):

        .. math::

            \mat{\rho_S} = \left[\frac{\Cov{F_{X_i}(X_i), F_{X_j}(X_j)}}
                                      {\sqrt{\Var{F_{X_i}(X_i)} \Var{F_{X_j}(X_j)}}},
                                 \quad i,j = 1, \ldots, d\right]

        See Also
        --------
        getKendallTau
        """
        return _model_copula2.MarshallOlkinCopula_getSpearmanCorrelation(self)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.MarshallOlkinCopula_getRealization(self)

    def isContinuous(self):
        r"""
        Test whether the distribution is continuous or not.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.MarshallOlkinCopula_isContinuous(self)

    def __init__(self, *args):
        _model_copula2.MarshallOlkinCopula_swiginit(self, _model_copula2.new_MarshallOlkinCopula(*args))
    __swig_destroy__ = _model_copula2.delete_MarshallOlkinCopula

# Register MarshallOlkinCopula in _model_copula2:
_model_copula2.MarshallOlkinCopula_swigregister(MarshallOlkinCopula)
class MinCopula(openturns.model_copula.DistributionImplementation):
    r"""
    MinCopula.

    The Min Copula is defined by:

    .. math::

        C(u_1, \cdots, u_n) = \min_{i=1, \cdots, n} u_i

    for :math:`u_i \in [0, 1]`

    Parameters
    ----------
    n : int
        Dimension of the copula, :math:`n \geq 1`.
        Default value is 2.

    See also
    --------
    Distribution

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> copula = ot.MinCopula(2)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.MinCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.MinCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.MinCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.MinCopula_getRealization(self)

    def computeDDF(self, *args):
        r"""
        Compute the derivative density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            The input value where the conditional derivative density function must be evaluated.

        Returns
        -------
        ddf : :class:`~openturns.Point`, :class:`~openturns.Sample`
            DDF value at *x*.

        Notes
        -----
        The derivative density function is the gradient of the probability density
        function with respect to :math:`\vect{x}`:

        .. math::

            \vect{\nabla}_{\vect{x}} f_{\vect{X}}(\vect{x}) =
                \Tr{\left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_1},
                         \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_d}\right)},
                \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.MinCopula_computeDDF(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.MinCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.MinCopula_computeCDF(self, *args)

    def computeQuantile(self, *args):
        r"""
        Compute the quantile function.

        Parameters
        ----------
        p : float (or sequence of float), :math:`p \in [0, 1]`
            A probability.
        tail : bool, optional
            `True` indicates that the order considered is :math:`1-p`.
            Default value is `False`.

        Returns
        -------
        xp : :class:`~openturns.Point` (or :class:`~openturns.Sample`)
            If `tail=False`, the quantile of order :math:`p`.
            If `tail=True`, the quantile of order  :math:`1-p`.

        Notes
        -----
        If the underlying variable :math:`X` is scalar, then the quantile of order :math:`p`, denoted by :math:`x_p`,
        is defined as the generalized inverse of its cumulative distribution function:

        .. math::

             x_p  = F_X^{-1}(p) = \inf \{ x \in \Rset\, |\, F(x) \geq p \}, \quad 0 \leq p \leq 1.

        If the distribution is scalar and discrete, then the quantile of order :math:`p=0` is defined by:

        .. math::

            x_0 = \sup \{ x \in \Rset \, |\, F(x) = 0 \}.

        If the underlying variable :math:`\vect{X} = (X_1, \dots, X_d)` is of dimension :math:`d>1`, then
        the quantile of order :math:`p`, denoted by :math:`\vect{x}_p \in \Rset^d`, is such that:

        .. math::

            \begin{aligned}
                F_{\vect{X}}(\vect{x}_p) & =  p \\    
                F_{X_i}(\vect{x}_{p,i}) & =  F_{X_j}(\vect{x}_{p,j}) \quad \forall (i,j)
            \end{aligned}

        where :math:`F_{X_i}` is the :math:`i`-th marginal cdf. The last condition means that the quantile of order :math:`p`
        is such that all the components are associated to the same order of quantile of their margin.

        """
        return _model_copula2.MinCopula_computeQuantile(self, *args)

    def computeSurvivalFunction(self, *args):
        r"""
        Compute the survival function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        s : float, :class:`~openturns.Point`
            Value of the survival function at point *x*.

        Notes
        -----
        The survival function of the random vector :math:`\vect{X}` of dimension :math:`d` is defined as follows:

        .. math::

            S_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i = 1}^d \left\{X_i > x_i \right\}}, \qquad \vect{x} \in \Rset^d

        .. warning::

            This is not the complementary cumulative distribution function except for
            scalar distributions.

        See Also
        --------
        computeComplementaryCDF
        """
        return _model_copula2.MinCopula_computeSurvivalFunction(self, *args)

    def computeInverseSurvivalFunction(self, prob):
        r"""
        Compute the inverse survival function.

        Parameters
        ----------
        p : float, :math:`p \in [0; 1]`
            Value of the survival function.

        Returns
        -------
        x : :class:`~openturns.Point`
            Point :math:`\vect{x}` such that :math:`S_{\vect{X}}(\vect{x}) = p` with iso-quantile components.

        Notes
        -----
        Among the points :math:`\vect{x}` that satisfy :math:`S_{\vect{X}}(\vect{x}) = p`,
        the method returns the one which also satisfies
        :math:`\Prob{X_1 > x_1}   =  \dots = \Prob{X_d > x_d}`.

        See Also
        --------
        computeQuantile, computeSurvivalFunction
        """
        return _model_copula2.MinCopula_computeInverseSurvivalFunction(self, prob)

    def computeEntropy(self):
        r"""
        Compute the entropy of the distribution.

        Returns
        -------
        e : float
            Entropy of the distribution.

        Notes
        -----
        The entropy of a distribution is defined by:

        .. math::

            \cE_X = \Expect{-\log(p_X(\vect{X}))}

        Where the random vector :math:`\vect{X}` follows the probability
        distribution of interest, and :math:`p_X` is either the *probability
        density function* of :math:`\vect{X}` if it is continuous or the
        *probability distribution function* if it is discrete.

        """
        return _model_copula2.MinCopula_computeEntropy(self)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.MinCopula_getKendallTau(self)

    def getMarginal(self, *args):
        r"""
        Accessor to marginal distributions.

        Parameters
        ----------
        i : int or list of ints, :math:`0 \leq i < d`
            Component(s) indice(s).

        Returns
        -------
        distribution : :class:`~openturns.Distribution`
            The marginal distribution of the selected component(s).
        """
        return _model_copula2.MinCopula_getMarginal(self, *args)

    def getIsoProbabilisticTransformation(self):
        r"""
        Accessor to the iso-probabilistic transformation.

        Refer to :any:`isoprobabilistic_transformation`.

        Returns
        -------
        T : :class:`~openturns.Function`
            Iso-probabilistic transformation.

        Notes
        -----
        The iso-probabilistic transformation is defined as follows:

        .. math::

            T: \left|\begin{array}{rcl}
                    \supp{\vect{X}} & \rightarrow & \Rset^n \\
                    \vect{x} & \mapsto & \vect{u}
               \end{array}\right.

        An iso-probabilistic transformation is a *diffeomorphism* [#diff]_ from
        :math:`\supp{\vect{X}}` to :math:`\Rset^d` that maps realizations
        :math:`\vect{x}` of a random vector :math:`\vect{X}` into realizations
        :math:`\vect{y}` of another random vector :math:`\vect{Y}` while
        preserving probabilities. It is hence defined so that it satisfies:

        .. math::
            :nowrap:

            \begin{eqnarray*}
                \Prob{\bigcap_{i=1}^d X_i \leq x_i}
                    & = & \Prob{\bigcap_{i=1}^d Y_i \leq y_i} \\
                F_{\vect{X}}(\vect{x})
                    & = & F_{\vect{Y}}(\vect{y})
            \end{eqnarray*}

        **The present** implementation of the iso-probabilistic transformation maps
        realizations :math:`\vect{x}` into realizations :math:`\vect{u}` of a
        random vector :math:`\vect{U}` with *spherical distribution* [#spherical]_.
        To be more specific:

            - if the distribution is elliptical, then the transformed distribution is
              simply made spherical using the **Nataf (linear) transformation**.
            - if the distribution has an elliptical Copula, then the transformed
              distribution is made spherical using the **generalized Nataf
              transformation**.
            - otherwise, the transformed distribution is the standard multivariate
              Normal distribution and is obtained by means of the **Rosenblatt
              transformation**.

        .. [#diff] A differentiable map :math:`f` is called a *diffeomorphism* if it
            is a bijection and its inverse :math:`f^{-1}` is differentiable as well.
            Hence, the iso-probabilistic transformation implements a gradient (and
            even a Hessian).

        .. [#spherical] A distribution is said to be *spherical* if it is invariant by
            rotation. Mathematically, :math:`\vect{U}` has a spherical distribution
            if:

            .. math::

                \mat{Q}\,\vect{U} \sim \vect{U},
                \quad \forall \mat{Q} \in \cO_n(\Rset)

        See also
        --------
        openturns.Distribution.getInverseIsoProbabilisticTransformation
        openturns.Distribution.isElliptical
        openturns.Distribution.hasEllipticalCopula
        """
        return _model_copula2.MinCopula_getIsoProbabilisticTransformation(self)

    def getInverseIsoProbabilisticTransformation(self):
        r"""
        Accessor to the inverse iso-probabilistic transformation.

        Returns
        -------
        Tinv : :class:`~openturns.Function`
            Inverse iso-probabilistic transformation.

        Notes
        -----
        The inverse iso-probabilistic transformation is defined as follows:

        .. math::

            T^{-1}: \left|\begin{array}{rcl}
                        \Rset^n & \rightarrow & \supp{\vect{X}} \\
                        \vect{u} & \mapsto & \vect{x}
                    \end{array}\right.

        See also
        --------
        openturns.Distribution.getIsoProbabilisticTransformation
        """
        return _model_copula2.MinCopula_getInverseIsoProbabilisticTransformation(self)

    def isElliptical(self):
        r"""
        Test whether the distribution is elliptical or not.

        Returns
        -------
        test : bool
            Answer.

        Notes
        -----
        A multivariate distribution is said to be *elliptical* if its characteristic
        function is of the form:

        .. math::

            \phi(\vect{t}) = \exp\left(i \Tr{\vect{t}} \vect{\mu}\right)
                             \Psi\left(\Tr{\vect{t}} \mat{\Sigma} \vect{t}\right),
                             \quad \vect{t} \in \Rset^d

        for specified vector :math:`\vect{\mu}` and positive-definite matrix
        :math:`\mat{\Sigma}`. The function :math:`\Psi` is known as the
        *characteristic generator* of the elliptical distribution.
        """
        return _model_copula2.MinCopula_isElliptical(self)

    def isContinuous(self):
        r"""
        Test whether the distribution is continuous or not.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.MinCopula_isContinuous(self)

    def hasEllipticalCopula(self):
        r"""
        Test whether the copula of the distribution is elliptical or not.

        Returns
        -------
        test : bool
            Answer.

        See Also
        --------
        isElliptical
        """
        return _model_copula2.MinCopula_hasEllipticalCopula(self)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.MinCopula_hasIndependentCopula(self)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.MinCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.MinCopula_getParameterDescription(self)

    def __init__(self, *args):
        _model_copula2.MinCopula_swiginit(self, _model_copula2.new_MinCopula(*args))
    __swig_destroy__ = _model_copula2.delete_MinCopula

# Register MinCopula in _model_copula2:
_model_copula2.MinCopula_swigregister(MinCopula)
class NormalCopula(openturns.model_copula.DistributionImplementation):
    r"""
    Normal copula.

    The Normal copula is defined by:

    .. math::

        C(u_1, \cdots, u_n) = \Phi_{\mat{R}}^n(\Phi^{-1}(u_1), \cdots, \Phi^{-1}(u_n))

    where :math:`\Phi_{\mat{R}}^n` is the cumulative distribution function of the
    normal distribution with zero mean, unit marginal variances and correlation :math:`R`:

    .. math::

        \Phi_{\mat{R}}^n(\vect{x}) = \int_{-\infty}^{x_1} \ldots
                                       \int_{-\infty}^{x_n}
                                       \frac{1}
                                            {{(2\pi\det{\mat{R}})}^{\frac{n}{2}}}
                                     \exp \left(-\frac{\Tr{\vect{u}}\mat{R}\vect{u}}{2} \right)\di{\vect{u}}

    with :math:`\Phi` given by:

    .. math::

          \Phi(x) = \int_{-\infty}^x \frac{1}{\sqrt{2\pi}} e^{-\frac{t^2}{2}}\di{t}

    The correlation matrix :math:`\mat{R}` is linked to the Spearman correlation
    and the Kendall concordance through the following relations:      

    - From the Spearman correlation matrix:

      .. math ::

          \mat{R}_{ij} = 2 \sin \left( \frac{\pi}{6}\rho_{ij}^S \right)

      where :math:`\rho_{ij}^S = \rho^S(X_i,X_j) = \rho^P(F_{X_i}(X_i),F_{X_j}(X_j))`

    - From the Kendall concordance matrix:

      .. math::

          \mat{R}_{ij} = \sin \left( \frac{\pi}{2} \tau_{ij} \right)

      with

      .. math::

          \tau_{ij} = \tau(X_i,X_j)
                    = \Prob{(X_{i_1} - X_{i_2})(X_{j_1} - X_{j_2}) > 0} -
                      \Prob{(X_{i_1} - X_{i_2})(X_{j_1} - X_{j_2}) < 0}

      where :math:`(X_{i_1},X_{j_1}` and :math:`(X_{i_2},X_{j_2})` follow the
      distribution of :math:`(X_i,X_j)`.

    Available constructor:
        NormalCopula(*n*)

        NormalCopula(*R*)

    Parameters
    ----------
    n : int, :math:`n \geq 1`
        Dimension of the copula.
        Default value is 2.

    R : :class:`~openturns.CorrelationMatrix`
        Shape matrix :math:`\mat{R}` of the copula, ie the correlation matrix of
        any normal distribution with this copula (it is not the Kendall nor the
        Spearman rank correlation matrix of the distribution).
        Default value is the identity matrix.

    See also
    --------
    Distribution

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> R = ot.CorrelationMatrix(3)
    >>> R[0, 1] = 0.25
    >>> R[1, 2] = 0.25
    >>> copula = ot.NormalCopula(R)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.NormalCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.NormalCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.NormalCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.NormalCopula_getRealization(self)

    def getSample(self, size):
        r"""
        Accessor to a pseudo-random sample from the distribution.

        Parameters
        ----------
        size : int
            Sample size.

        Returns
        -------
        sample : :class:`~openturns.Sample`
            A pseudo-random sample of the distribution.

        See Also
        --------
        getRealization, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.NormalCopula_getSample(self, size)

    def computeDDF(self, *args):
        r"""
        Compute the derivative density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            The input value where the conditional derivative density function must be evaluated.

        Returns
        -------
        ddf : :class:`~openturns.Point`, :class:`~openturns.Sample`
            DDF value at *x*.

        Notes
        -----
        The derivative density function is the gradient of the probability density
        function with respect to :math:`\vect{x}`:

        .. math::

            \vect{\nabla}_{\vect{x}} f_{\vect{X}}(\vect{x}) =
                \Tr{\left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_1},
                         \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial x_d}\right)},
                \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.NormalCopula_computeDDF(self, *args)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.NormalCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.NormalCopula_computeCDF(self, *args)

    def computeSurvivalFunction(self, *args):
        r"""
        Compute the survival function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        s : float, :class:`~openturns.Point`
            Value of the survival function at point *x*.

        Notes
        -----
        The survival function of the random vector :math:`\vect{X}` of dimension :math:`d` is defined as follows:

        .. math::

            S_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i = 1}^d \left\{X_i > x_i \right\}}, \qquad \vect{x} \in \Rset^d

        .. warning::

            This is not the complementary cumulative distribution function except for
            scalar distributions.

        See Also
        --------
        computeComplementaryCDF
        """
        return _model_copula2.NormalCopula_computeSurvivalFunction(self, *args)

    def computeProbability(self, interval):
        r"""
        Compute the interval probability.

        Parameters
        ----------
        interval : :class:`~openturns.Interval`
            An interval in :math:`\Rset^d`.

        Returns
        -------
        p : float
            The probability of *interval*.

        Notes
        -----
        This computes the probability that the random vector :math:`\vect{X}` lies in :math:`interval`.

        If the interval is rectangular, i.e. if :math:`I = \bigcap\limits_{i=1}^d [a_i, b_i]`, then we have:

        .. math::

            \Prob{\vect{X} \in I} = \sum\limits_{\vect{c}} (-1)^{n(\vect{c})}
                    F_{\vect{X}}\left(\vect{c}\right)

        where the sum runs over the :math:`2^d` vectors such that
        :math:`\vect{c} = \Tr{(c_i, i = 1, \ldots, d)}` with :math:`c_i \in \{a_i, b_i\}`,
        and :math:`n(\vect{c})` is the number of components in
        :math:`\vect{c}` such that :math:`c_i = a_i`.
        """
        return _model_copula2.NormalCopula_computeProbability(self, interval)

    def computeEntropy(self):
        r"""
        Compute the entropy of the distribution.

        Returns
        -------
        e : float
            Entropy of the distribution.

        Notes
        -----
        The entropy of a distribution is defined by:

        .. math::

            \cE_X = \Expect{-\log(p_X(\vect{X}))}

        Where the random vector :math:`\vect{X}` follows the probability
        distribution of interest, and :math:`p_X` is either the *probability
        density function* of :math:`\vect{X}` if it is continuous or the
        *probability distribution function* if it is discrete.

        """
        return _model_copula2.NormalCopula_computeEntropy(self)

    def getShapeMatrix(self):
        r"""
        Accessor to the shape matrix of the underlying copula if it is elliptical.

        Returns
        -------
        shape : :class:`~openturns.CorrelationMatrix`
            Shape matrix of the elliptical copula of a distribution.

        Notes
        -----
        This is not the Pearson correlation matrix.

        See Also
        --------
        getPearsonCorrelation
        """
        return _model_copula2.NormalCopula_getShapeMatrix(self)

    def getKendallTau(self):
        r"""
        Accessor to the Kendall coefficients matrix.

        Returns
        -------
        tau : :class:`~openturns.CorrelationMatrix`
            Kendall coefficients matrix.

        Notes
        -----
        The Kendall coefficients matrix is defined as:

        .. math::

            \mat{\tau} = \Big[& \Prob{X_i < x_i \cap X_j < x_j
                                      \cup
                                      X_i > x_i \cap X_j > x_j} \\
                              & - \Prob{X_i < x_i \cap X_j > x_j
                                        \cup
                                        X_i > x_i \cap X_j < x_j},
                              \quad i,j = 1, \ldots, n\Big]

        See Also
        --------
        getSpearmanCorrelation
        """
        return _model_copula2.NormalCopula_getKendallTau(self)

    def computePDFGradient(self, point):
        r"""
        Compute the gradient of the probability density function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dfdtheta : :class:`~openturns.Point`
            Partial derivatives of the PDF with respect to the distribution
            parameters at input *x*.

        Notes
        -----
        Let :math:`\vect{\theta}` be the vector of parameters of the distribution. Then
        the gradient of the probability density function :math:`f_{\vect{X}}` is defined by:

        .. math::

            \left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_1}, \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_d}\right)

        """
        return _model_copula2.NormalCopula_computePDFGradient(self, point)

    def computeCDFGradient(self, point):
        r"""
        Compute the gradient of the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dFdtheta : :class:`~openturns.Point`
            Partial derivatives of the CDF with respect to the distribution
            parameters at *x*.
        """
        return _model_copula2.NormalCopula_computeCDFGradient(self, point)

    def computeConditionalPDF(self, *args):
        r"""
        Compute the conditional probability density function.

        Conditional PDF of the last component with respect to the other fixed components.

        Parameters
        ----------
        xj : float, sequence of float, 
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        cpdf : float, sequence of float
            Conditional PDF at *xd*, given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional probability density function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             \dfrac{d}{d\,x_j}F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1})

        where for :math:`2 \leq j \leq d`:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
            \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`\dfrac{d}{d\,x_1}F_{X_1}(x_1)`.

        See Also
        --------
        computePDF, computeConditionalCDF
        """
        return _model_copula2.NormalCopula_computeConditionalPDF(self, *args)

    def computeSequentialConditionalPDF(self, x):
        r"""
        Compute the sequential conditional probability density function.

        Parameters
        ----------
        x : sequence of float, with size :math:`d`
            Values to be taken sequentially as argument and conditioning part of the PDF.

        Returns
        -------
        pdf : sequence of float
            Sequence of conditional PDF values at *x*.

        Notes
        -----
        The sequential conditional density function is defined as follows:

        .. math::

            \left(\dfrac{d}{d\,x_j}F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1})\right)_{j=1,\ldots,d}

        where for :math:`2 \leq j \leq d`:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
            \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        The first term, for :math:`j=1`, is :math:`\dfrac{d}{d\,x_1}F_{X_1}(x_1)`.
        """
        return _model_copula2.NormalCopula_computeSequentialConditionalPDF(self, x)

    def computeConditionalCDF(self, *args):
        r"""
        Compute the conditional cumulative distribution function.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        p : float, sequence of float
            Conditional CDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional cumulative distribution function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})` is defined by:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
                \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.NormalCopula_computeConditionalCDF(self, *args)

    def computeSequentialConditionalCDF(self, x):
        r"""
        Compute the sequential conditional cumulative distribution functions.

        Parameters
        ----------
        x : sequence of float, with size :math:`d`
            Values to be taken sequentially as argument and conditioning part of the CDF.

        Returns
        -------
        F : sequence of float
            Conditional CDF values at *x*.

        Notes
        -----
        The sequential conditional cumulative distribution function is defined as follows:

        .. math::

            \left(F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1})\right)_{j=1,\ldots,d}

        where for :math:`2 \leq j \leq d`:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
            \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        The first term, for :math:`j=1`, is :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.NormalCopula_computeSequentialConditionalCDF(self, x)

    def computeConditionalQuantile(self, *args):
        r"""
        Compute the conditional quantile function of the last component.

        Conditional quantile with respect to the other fixed components.

        Parameters
        ----------
        p : float, sequence of float, :math:`p \in [0, 1]`
            Conditional quantile.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        xj : float
            Conditional quantile of order *p* of the component :math:`X_j`
            given that the components of indices :math:`k \leq j-1` are fixed and
            equal to *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional quantile of order :math:`p` of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p; x_1, \dots, x_{j-1})

        where :math:`F^{-1}` is the quantile function.
        For :math:`j=1`, it
        reduces to :math:`F^{-1}_{X_1}(p)`.

        See Also
        --------
        computeQuantile, computeConditionalCDF
        """
        return _model_copula2.NormalCopula_computeConditionalQuantile(self, *args)

    def computeSequentialConditionalQuantile(self, q):
        r"""
        Compute the conditional quantile function of the last component.

        Parameters
        ----------
        p : sequence of float in :math:`[0,1]`, with size :math:`d`
            Values to be taken sequentially as the argument of the conditional quantile.

        Returns
        -------
        Q : sequence of float
            Sequence of conditional quantiles values at *p*

        Notes
        -----
        The sequential conditional quantile function is defined by:

        .. math::

            \left(F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p_j; x_1, \dots, x_{j-1})\right)_{i=1,\ldots,d}

        where :math:`F^{-1}` is the quantile function and
        where :math:`x_1,\ldots,x_{j-1}` are defined recursively as :math:`x_1=F_1^{-1}(p_1)` and for :math:`2\leq j \leq d`,
        :math:`x_j=F_{X_j}^{-1}(p_j|X_1=x_1,\ldots,X_{j-1}=x_{j-1})`: the conditioning part is the set of already
        computed conditional quantiles.
        """
        return _model_copula2.NormalCopula_computeSequentialConditionalQuantile(self, q)

    def getMarginal(self, *args):
        r"""
        Accessor to marginal distributions.

        Parameters
        ----------
        i : int or list of ints, :math:`0 \leq i < d`
            Component(s) indice(s).

        Returns
        -------
        distribution : :class:`~openturns.Distribution`
            The marginal distribution of the selected component(s).
        """
        return _model_copula2.NormalCopula_getMarginal(self, *args)

    def getIsoProbabilisticTransformation(self):
        r"""
        Accessor to the iso-probabilistic transformation.

        Refer to :any:`isoprobabilistic_transformation`.

        Returns
        -------
        T : :class:`~openturns.Function`
            Iso-probabilistic transformation.

        Notes
        -----
        The iso-probabilistic transformation is defined as follows:

        .. math::

            T: \left|\begin{array}{rcl}
                    \supp{\vect{X}} & \rightarrow & \Rset^n \\
                    \vect{x} & \mapsto & \vect{u}
               \end{array}\right.

        An iso-probabilistic transformation is a *diffeomorphism* [#diff]_ from
        :math:`\supp{\vect{X}}` to :math:`\Rset^d` that maps realizations
        :math:`\vect{x}` of a random vector :math:`\vect{X}` into realizations
        :math:`\vect{y}` of another random vector :math:`\vect{Y}` while
        preserving probabilities. It is hence defined so that it satisfies:

        .. math::
            :nowrap:

            \begin{eqnarray*}
                \Prob{\bigcap_{i=1}^d X_i \leq x_i}
                    & = & \Prob{\bigcap_{i=1}^d Y_i \leq y_i} \\
                F_{\vect{X}}(\vect{x})
                    & = & F_{\vect{Y}}(\vect{y})
            \end{eqnarray*}

        **The present** implementation of the iso-probabilistic transformation maps
        realizations :math:`\vect{x}` into realizations :math:`\vect{u}` of a
        random vector :math:`\vect{U}` with *spherical distribution* [#spherical]_.
        To be more specific:

            - if the distribution is elliptical, then the transformed distribution is
              simply made spherical using the **Nataf (linear) transformation**.
            - if the distribution has an elliptical Copula, then the transformed
              distribution is made spherical using the **generalized Nataf
              transformation**.
            - otherwise, the transformed distribution is the standard multivariate
              Normal distribution and is obtained by means of the **Rosenblatt
              transformation**.

        .. [#diff] A differentiable map :math:`f` is called a *diffeomorphism* if it
            is a bijection and its inverse :math:`f^{-1}` is differentiable as well.
            Hence, the iso-probabilistic transformation implements a gradient (and
            even a Hessian).

        .. [#spherical] A distribution is said to be *spherical* if it is invariant by
            rotation. Mathematically, :math:`\vect{U}` has a spherical distribution
            if:

            .. math::

                \mat{Q}\,\vect{U} \sim \vect{U},
                \quad \forall \mat{Q} \in \cO_n(\Rset)

        See also
        --------
        openturns.Distribution.getInverseIsoProbabilisticTransformation
        openturns.Distribution.isElliptical
        openturns.Distribution.hasEllipticalCopula
        """
        return _model_copula2.NormalCopula_getIsoProbabilisticTransformation(self)

    def getInverseIsoProbabilisticTransformation(self):
        r"""
        Accessor to the inverse iso-probabilistic transformation.

        Returns
        -------
        Tinv : :class:`~openturns.Function`
            Inverse iso-probabilistic transformation.

        Notes
        -----
        The inverse iso-probabilistic transformation is defined as follows:

        .. math::

            T^{-1}: \left|\begin{array}{rcl}
                        \Rset^n & \rightarrow & \supp{\vect{X}} \\
                        \vect{u} & \mapsto & \vect{x}
                    \end{array}\right.

        See also
        --------
        openturns.Distribution.getIsoProbabilisticTransformation
        """
        return _model_copula2.NormalCopula_getInverseIsoProbabilisticTransformation(self)

    def hasEllipticalCopula(self):
        r"""
        Test whether the copula of the distribution is elliptical or not.

        Returns
        -------
        test : bool
            Answer.

        See Also
        --------
        isElliptical
        """
        return _model_copula2.NormalCopula_hasEllipticalCopula(self)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.NormalCopula_hasIndependentCopula(self)

    def computeUpperTailDependenceMatrix(self):
        r"""
        Compute the upper tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that its copula is
        denoted by :math:`C`.
        The upper tail dependence matrix is :math:`(\chi^{ij})_{1 \leq i, j \leq d}` where :math:`\chi^{ij}` is
        the upper tail dependence coefficient of the bivariate distribution :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi^{ij} = \lim_{u \to 1} \chi^{ij}(u)

        where  :math:`u \mapsto \chi^{ij}(u)` is the upper tail dependence function of the bivariate distribution
        :math:`(X_i, X_j)` defined by:

        .. math::

            \chi(u) = 2 - \frac{\log C(u,u)}{\log u}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chi = copula.computeUpperTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.NormalCopula_computeUpperTailDependenceMatrix(self)

    def computeLowerTailDependenceMatrix(self):
        r"""
        Compute the lower tail dependence coefficients.

        We assume that the distribution is :math:`d`-dimensional, with :math:`d \geq 2` and that
        its copula is denoted by :math:`C`.
        The lower tail dependence matrix is :math:`(\chi_L^{ij})_{1 \leq i, j \leq d}` where
        :math:`\chi_L^{ij}` is the lower tail dependence coefficient of the bivariate distribution
        :math:`(X_i, X_j)`.
        It is defined by:

        .. math::

            \chi_L^{ij} = \lim_{u \to 0} \chi_L^{ij}(u)

        where  :math:`u \mapsto \chi_L^{ij}(u)` is the lower tail dependence function of the bivariate
        distribution :math:`(X_i, X_j)` defined by:

        .. math::

            \chi_L(u) = \frac{\log (1 - C(u,u))}{\log (1-u)}, \forall u \in [0,1]

        Refer to :any:`tail_dependence` to get more details.

        Returns
        -------
        dep : :class:`~openturns.CorrelationMatrix`
            The dependence matrix.

        Examples
        --------
        >>> import openturns as ot
        >>> copula = ot.FrankCopula()
        >>> chiL = copula.computeLowerTailDependenceMatrix()[1, 0]
        """
        return _model_copula2.NormalCopula_computeLowerTailDependenceMatrix(self)

    def setParametersCollection(self, *args):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameters : :class:`~openturns.PointWithDescription`
            Dictionary-like object with parameters names and values.
        """
        return _model_copula2.NormalCopula_setParametersCollection(self, *args)

    def setParameter(self, parameter):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameter : sequence of float
            Parameter values.
        """
        return _model_copula2.NormalCopula_setParameter(self, parameter)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.NormalCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.NormalCopula_getParameterDescription(self)

    @staticmethod
    def GetCorrelationFromSpearmanCorrelation(matrix):
        r"""
        Get the correlation matrix from the Spearman correlation matrix.

        Parameters
        ----------
        S : :class:`~openturns.CorrelationMatrix`
            Spearman correlation matrix :math:`S` of the considered random vector.

        Returns
        -------
        R : :class:`~openturns.CorrelationMatrix`
            Correlation matrix :math:`\mat{R}` of the normal copula evaluated from
            the Spearman correlation matrix :math:`S`.
        """
        return _model_copula2.NormalCopula_GetCorrelationFromSpearmanCorrelation(matrix)

    @staticmethod
    def GetCorrelationFromKendallCorrelation(matrix):
        r"""
        Get the correlation matrix from the Kendall correlation matrix.

        Parameters
        ----------
        K : :class:`~openturns.CorrelationMatrix`
            Kendall correlation matrix of the considered random vector.

        Returns
        -------
        R : :class:`~openturns.CorrelationMatrix`
            Correlation matrix :math:`\mat{R}` of the normal copula evaluated from
            the Kendall correlation matrix :math:`K`.
        """
        return _model_copula2.NormalCopula_GetCorrelationFromKendallCorrelation(matrix)

    def __init__(self, *args):
        _model_copula2.NormalCopula_swiginit(self, _model_copula2.new_NormalCopula(*args))
    __swig_destroy__ = _model_copula2.delete_NormalCopula

# Register NormalCopula in _model_copula2:
_model_copula2.NormalCopula_swigregister(NormalCopula)
class NormalCopulaFactory(openturns.model_copula.DistributionFactoryImplementation):
    r"""
    Normal Copula factory.

    Notes
    -----
    We note :math:`\Hat{\tau}_n` the Kendall-\ :math:`\tau` of the sample.

    The correlation matrix :math:`\mat{R}_n` is first estimated using Kendall's tau by:

    .. math::

        R_{n,ij} = \sin\left(\frac{\pi}{2}\Hat{\tau}_{n,ij}\right)_{\strut}

    and if it fails, using Spearman's correlation:

    .. math::

        R_{n,ij} = 2\sin\left(\frac{\pi}{6}\Hat{\rho}_{n,ij}\right)_{\strut}


    See also
    --------
    DistributionFactory, NormalCopula
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

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

    def build(self, *args):
        r"""
        Build the distribution.

        **Available usages**:

            build()

            build(*sample*)

            build(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
            The parameters of the distribution.

        Returns
        -------
        dist : :class:`~openturns.Distribution`
            The estimated distribution.

            In the first usage, the default native distribution is built.
        """
        return _model_copula2.NormalCopulaFactory_build(self, *args)

    def buildAsNormalCopula(self, *args):
        r"""
        Estimate the copula as native copula.

        **Available usages**:

            buildAsNormalCopula()

            buildAsNormalCopula(*sample*)

            buildAsNormalCopula(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
           The parameters of the :class:`~openturns.NormalCopula`.

        Returns
        -------
        copula : :class:`~openturns.NormalCopula`
            The estimated copula as a Normal copula.

            In the first usage, the default Normal copula is built.
        """
        return _model_copula2.NormalCopulaFactory_buildAsNormalCopula(self, *args)

    def __init__(self, *args):
        _model_copula2.NormalCopulaFactory_swiginit(self, _model_copula2.new_NormalCopulaFactory(*args))
    __swig_destroy__ = _model_copula2.delete_NormalCopulaFactory

# Register NormalCopulaFactory in _model_copula2:
_model_copula2.NormalCopulaFactory_swigregister(NormalCopulaFactory)
class PlackettCopula(openturns.model_copula.DistributionImplementation):
    r"""
    Plackett copula.

    The Plackett copula is a bivariate symmetric copula defined by:

    .. math::

        C(u_1, u_2) = \frac{\left[1+(\theta-1)(u_1+u_2)\right]-
                      \sqrt{\left[1+(\theta-1)(u_1+u_2)\right]^2-
                      4u_1u_2\theta(\theta-1)}}{2(\theta-1)}

    for :math:`(u_1, u_2) \in [0, 1]^2`

    This copula is the only copula with constant *odd ratio* :math:`\theta\geq 0`:

    .. math::

       \theta = \frac{\Prob{U_1\leq u_1,U_2\leq u_2}\Prob{U_1>u_1,U_2>u_2}}{\Prob{U_1\leq u_1,U_2>u_2}\Prob{U_1>u_1,U_2\leq u_2}} = \frac{C(u_1,u_2)\left[1-u_1-u_2+C(u_1,u_2)\right]}{\left[u_1-C(u_1,u_2)\right]\left[u_2-C(u_1,u_2)\right]}

    This is a *comprehensive family* of copulas as it contains:

    - the Frechet lower bound :math:`W(u_1,u_2)=\max(0,u_1+u_2-1)=\lim_{\theta\rightarrow\infty}C(u_1,u_2)`,
    - the Frechet upper bound :math:`M(u_1,u_2)=\min(u_1,u_2)=C_0(u_1,u_2)`
    - the independent copula :math:`\Pi(u_1,u_2)=u_1u_2=C_1(u_1,u_2)`.

    Parameters
    ----------
    theta : float, optional
        Parameter :math:`\theta`, :math:`\theta \geq 0`.
        Default value is 2.0.

    Examples
    --------
    Create a distribution:

    >>> import openturns as ot
    >>> copula = ot.PlackettCopula(2.5)

    Draw a sample:

    >>> sample = copula.getSample(5)

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

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

    def __eq__(self, *args):
        return _model_copula2.PlackettCopula___eq__(self, *args)

    def __repr__(self):
        return _model_copula2.PlackettCopula___repr__(self)

    def __str__(self, *args):
        return _model_copula2.PlackettCopula___str__(self, *args)

    def getRealization(self):
        r"""
        Accessor to a pseudo-random realization from the distribution.

        Refer to :any:`distribution_realization`.

        Returns
        -------
        point : :class:`~openturns.Point`
            A pseudo-random realization of the distribution.

        See Also
        --------
        getSample, getSampleByInversion, getSampleByQMC
        """
        return _model_copula2.PlackettCopula_getRealization(self)

    def computePDF(self, *args):
        r"""
        Compute the probability density function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        f : float, :class:`~openturns.Point`
            PDF value at *x*.

        Notes
        -----
        The probability density function is defined as follows:

        .. math::

            f_{\vect{X}}(\vect{x}) = \frac{\partial^d F_{\vect{X}}(\vect{x})}
                                          {\prod_{i=1}^d \partial x_i},
                                     \quad \vect{x} \in \Rset^d
        """
        return _model_copula2.PlackettCopula_computePDF(self, *args)

    def computeCDF(self, *args):
        r"""
        Compute the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float, 2-d sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        F : float, :class:`~openturns.Point`
            CDF value at *x*.

        Notes
        -----
        The cumulative distribution function is defined as:

        .. math::

            F_{\vect{X}}(\vect{x}) = \Prob{\bigcap_{i=1}^n X_i \leq x_i},
                                     \quad \vect{x} \in \Rset^d

        This method is overloaded by most of the actual distributions. Many generic
        algorithms are available depending on the properties of the
        distribution and can be used by actual distributions:

        - for discrete distributions, it is a summation of the probabilities
          of the points contributing to the CDF;
        - for absolutely continuous distributions, it is done using an adaptive
          integration of the PDF using :class:`~openturns.IteratedQuadrature`;
        - for unimodal absolutely continuous distributions, it is done using an
          adaptive integration of the PDF using
          :class:`~openturns.IteratedQuadrature` over a front of boxes starting
          from the projection of the cell containing the mode and advancing in
          all the directions toward the point at which one want to compute the
          CDF and the directions pointing toward :math:`-\infty`. The size of
          the boxes is controlled by a parameter set by the actual distribution
          and the maximum number of cells to explore is controlled by the
          *Distribution-DefaultCDFIteration* entry of :class:`~openturns.ResourceMap`


        """
        return _model_copula2.PlackettCopula_computeCDF(self, *args)

    def computePDFGradient(self, point):
        r"""
        Compute the gradient of the probability density function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dfdtheta : :class:`~openturns.Point`
            Partial derivatives of the PDF with respect to the distribution
            parameters at input *x*.

        Notes
        -----
        Let :math:`\vect{\theta}` be the vector of parameters of the distribution. Then
        the gradient of the probability density function :math:`f_{\vect{X}}` is defined by:

        .. math::

            \left(\frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_1}, \dots, \frac{\partial f_{\vect{X}}(\vect{x})}{\partial \theta_d}\right)

        """
        return _model_copula2.PlackettCopula_computePDFGradient(self, point)

    def computeCDFGradient(self, point):
        r"""
        Compute the gradient of the cumulative distribution function.

        Parameters
        ----------
        x : sequence of float
            Point in :math:`\Rset^d`.

        Returns
        -------
        dFdtheta : :class:`~openturns.Point`
            Partial derivatives of the CDF with respect to the distribution
            parameters at *x*.
        """
        return _model_copula2.PlackettCopula_computeCDFGradient(self, point)

    def computeQuantile(self, *args):
        r"""
        Compute the quantile function.

        Parameters
        ----------
        p : float (or sequence of float), :math:`p \in [0, 1]`
            A probability.
        tail : bool, optional
            `True` indicates that the order considered is :math:`1-p`.
            Default value is `False`.

        Returns
        -------
        xp : :class:`~openturns.Point` (or :class:`~openturns.Sample`)
            If `tail=False`, the quantile of order :math:`p`.
            If `tail=True`, the quantile of order  :math:`1-p`.

        Notes
        -----
        If the underlying variable :math:`X` is scalar, then the quantile of order :math:`p`, denoted by :math:`x_p`,
        is defined as the generalized inverse of its cumulative distribution function:

        .. math::

             x_p  = F_X^{-1}(p) = \inf \{ x \in \Rset\, |\, F(x) \geq p \}, \quad 0 \leq p \leq 1.

        If the distribution is scalar and discrete, then the quantile of order :math:`p=0` is defined by:

        .. math::

            x_0 = \sup \{ x \in \Rset \, |\, F(x) = 0 \}.

        If the underlying variable :math:`\vect{X} = (X_1, \dots, X_d)` is of dimension :math:`d>1`, then
        the quantile of order :math:`p`, denoted by :math:`\vect{x}_p \in \Rset^d`, is such that:

        .. math::

            \begin{aligned}
                F_{\vect{X}}(\vect{x}_p) & =  p \\    
                F_{X_i}(\vect{x}_{p,i}) & =  F_{X_j}(\vect{x}_{p,j}) \quad \forall (i,j)
            \end{aligned}

        where :math:`F_{X_i}` is the :math:`i`-th marginal cdf. The last condition means that the quantile of order :math:`p`
        is such that all the components are associated to the same order of quantile of their margin.

        """
        return _model_copula2.PlackettCopula_computeQuantile(self, *args)

    def computeConditionalCDF(self, *args):
        r"""
        Compute the conditional cumulative distribution function.

        Parameters
        ----------
        xj : float, sequence of float
            Conditional CDF input.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        p : float, sequence of float
            Conditional CDF value at  *xj* given *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional cumulative distribution function of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})` is defined by:

        .. math::

            F_{X_j \mid X_1, \ldots, X_{j - 1}}(x_j; x_1, \dots, x_{j-1}) =
                \Prob{X_j \leq x_j \mid X_1=x_1, \ldots, X_{j-1}=x_{j-1}}.

        For :math:`j=1`, it
        reduces to :math:`F_{X_1}(x_1)`.
        """
        return _model_copula2.PlackettCopula_computeConditionalCDF(self, *args)

    def computeConditionalQuantile(self, *args):
        r"""
        Compute the conditional quantile function of the last component.

        Conditional quantile with respect to the other fixed components.

        Parameters
        ----------
        p : float, sequence of float, :math:`p \in [0, 1]`
            Conditional quantile.
        xcond : sequence of float, 2-d sequence of float with size :math:`j-1`, :math:`j \leq d`
            Conditioning values for the components :math:`(X_{1}, \dots, X_{j-1})`.

        Returns
        -------
        xj : float
            Conditional quantile of order *p* of the component :math:`X_j`
            given that the components of indices :math:`k \leq j-1` are fixed and
            equal to *xcond*.

        Notes
        -----
        Let :math:`\vect{X}` be a random vector of dimension :math:`d`.
        The conditional quantile of order :math:`p` of the component :math:`X_j`
        given that the components of indices :math:`k \leq j-1` are fixed to :math:`(x_1, \dots, x_{j-1})`
        is defined by:

        .. math::

             F^{-1}_{X_j \mid X_1, \ldots, X_{j - 1}}(p; x_1, \dots, x_{j-1})

        where :math:`F^{-1}` is the quantile function.
        For :math:`j=1`, it
        reduces to :math:`F^{-1}_{X_1}(p)`.

        See Also
        --------
        computeQuantile, computeConditionalCDF
        """
        return _model_copula2.PlackettCopula_computeConditionalQuantile(self, *args)

    def getMarginal(self, *args):
        r"""
        Accessor to marginal distributions.

        Parameters
        ----------
        i : int or list of ints, :math:`0 \leq i < d`
            Component(s) indice(s).

        Returns
        -------
        distribution : :class:`~openturns.Distribution`
            The marginal distribution of the selected component(s).
        """
        return _model_copula2.PlackettCopula_getMarginal(self, *args)

    def hasIndependentCopula(self):
        r"""
        Test whether the copula of the distribution is the independent one.

        Returns
        -------
        test : bool
            Answer.
        """
        return _model_copula2.PlackettCopula_hasIndependentCopula(self)

    def setParameter(self, parameter):
        r"""
        Accessor to the parameter of the distribution.

        Parameters
        ----------
        parameter : sequence of float
            Parameter values.
        """
        return _model_copula2.PlackettCopula_setParameter(self, parameter)

    def getParameter(self):
        r"""
        Accessor to the parameter of the distribution.

        Returns
        -------
        parameter : :class:`~openturns.Point`
            Parameter values.
        """
        return _model_copula2.PlackettCopula_getParameter(self)

    def getParameterDescription(self):
        r"""
        Accessor to the parameter description of the distribution.

        Returns
        -------
        description : :class:`~openturns.Description`
            Parameter names.
        """
        return _model_copula2.PlackettCopula_getParameterDescription(self)

    def setTheta(self, theta):
        r"""
        Set the parameter :math:`\theta`.

        Parameters
        ----------
        theta : float
            Parameter :math:`\theta\geq 0` of the copula.
        """
        return _model_copula2.PlackettCopula_setTheta(self, theta)

    def getTheta(self):
        r"""
        Get the parameter :math:`\theta`.

        Returns
        -------
        theta : float
            Parameter :math:`\theta` of the copula.
        """
        return _model_copula2.PlackettCopula_getTheta(self)

    def __init__(self, *args):
        _model_copula2.PlackettCopula_swiginit(self, _model_copula2.new_PlackettCopula(*args))
    __swig_destroy__ = _model_copula2.delete_PlackettCopula

# Register PlackettCopula in _model_copula2:
_model_copula2.PlackettCopula_swigregister(PlackettCopula)
class PlackettCopulaFactory(openturns.model_copula.DistributionFactoryImplementation):
    r"""
    Plackett Copula factory.

    Notes
    -----
    The parameter is estimated using the following equation:

    :math:`\Hat{\theta}_n` is solution of

    .. math::

        \displaystyle \Hat{\tau}_n = \frac{4m_n^2}{(1-2m_n)^2}

    where :math:`m_n` is the value of the empirical CDF :math:`F_n` at the median point :math:`({U_1}_{\lceil n/2 \rceil},{U_2}_{\lceil n/2 \rceil})` of the sample :math:`({U_1}_k,{U_2}_k)_{k\in\{1,\dots,n\}}`.

    See also
    --------
    DistributionFactory, PlackettCopula
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

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

    def build(self, *args):
        r"""
        Build the distribution.

        **Available usages**:

            build()

            build(*sample*)

            build(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data.
        param : sequence of float
            The parameters of the distribution.

        Returns
        -------
        dist : :class:`~openturns.Distribution`
            The estimated distribution.

            In the first usage, the default native distribution is built.
        """
        return _model_copula2.PlackettCopulaFactory_build(self, *args)

    def buildAsPlackettCopula(self, *args):
        r"""
        Estimate the copula as native copula.

        **Available usages**:

            buildAsPlackettCopula()

            buildAsPlackettCopula(*sample*)

            buildAsPlackettCopula(*param*)

        Parameters
        ----------
        sample : 2-d sequence of float
            Data of dimension 2.
        param : sequence of float of size 1
           The parameter :math:`\theta`.

        Returns
        -------
        copula : :class:`~openturns.PlackettCopula`
            The estimated copula as a Plackett copula.

            In the first usage, the default Plackett copula is built.
        """
        return _model_copula2.PlackettCopulaFactory_buildAsPlackettCopula(self, *args)

    def __init__(self, *args):
        _model_copula2.PlackettCopulaFactory_swiginit(self, _model_copula2.new_PlackettCopulaFactory(*args))
    __swig_destroy__ = _model_copula2.delete_PlackettCopulaFactory

# Register PlackettCopulaFactory in _model_copula2:
_model_copula2.PlackettCopulaFactory_swigregister(PlackettCopulaFactory)

