# encoding: utf-8
# module dipy.segment.metricspeed
# from C:\Users\xukai\Downloads\发票2\venv\Lib\site-packages\dipy\segment\metricspeed.cp311-win_amd64.pyd
# by generator 1.147
# no doc

# imports
import builtins as __builtins__ # <module 'builtins' (built-in)>
import numpy as np # C:\Users\xukai\Downloads\发票2\venv\Lib\site-packages\numpy\__init__.py
import math as math # <module 'math' (built-in)>

# functions

def dist(*args, **kwargs): # real signature unknown
    """
    Computes a distance between `datum1` and `datum2`.
    
        A sequence of N-dimensional points is represented as a 2D array with
        shape (nb_points, nb_dimensions).
    
        Parameters
        ----------
        metric : `Metric` object
            Tells how to compute the distance between `datum1` and `datum2`.
        datum1 : 2D array
            Sequence of N-dimensional points.
        datum2 : 2D array
            Sequence of N-dimensional points.
    
        Returns
        -------
        double
            Distance between two data points.
    """
    pass

def distance_matrix(*args, **kwargs): # real signature unknown
    """
    Computes the distance matrix between two lists of sequential data.
    
        The distance matrix is obtained by computing the pairwise distance of all
        tuples spawn by the Cartesian product of `data1` with `data2`. If `data2`
        is not provided, the Cartesian product of `data1` with itself is used
        instead. A sequence of N-dimensional points is represented as a 2D array with
        shape (nb_points, nb_dimensions).
    
        Parameters
        ----------
        metric : `Metric` object
            Tells how to compute the distance between two sequential data.
        data1 : list of 2D arrays
            List of sequences of N-dimensional points.
        data2 : list of 2D arrays
            Llist of sequences of N-dimensional points.
    
        Returns
        -------
        2D array (double)
            Distance matrix.
    """
    pass

def __pyx_unpickle_AveragePointwiseEuclideanMetric(*args, **kwargs): # real signature unknown
    pass

def __pyx_unpickle_CosineMetric(*args, **kwargs): # real signature unknown
    pass

def __pyx_unpickle_CythonMetric(*args, **kwargs): # real signature unknown
    pass

def __pyx_unpickle_Enum(*args, **kwargs): # real signature unknown
    pass

def __pyx_unpickle_Metric(*args, **kwargs): # real signature unknown
    pass

def __pyx_unpickle_MinimumAverageDirectFlipMetric(*args, **kwargs): # real signature unknown
    pass

def __pyx_unpickle_SumPointwiseEuclideanMetric(*args, **kwargs): # real signature unknown
    pass

# classes

class Metric(object):
    """
    Computes a distance between two sequential data.
    
        A sequence of N-dimensional points is represented as a 2D array with
        shape (nb_points, nb_dimensions). A `feature` object can be specified
        in order to calculate the distance between extracted features, rather
        than directly between the sequential data.
    
        Parameters
        ----------
        feature : `Feature` object, optional
            It is used to extract features before computing the distance.
    
        Notes
        -----
        When subclassing `Metric`, one only needs to override the `dist` and
        `are_compatible` methods.
    """
    def are_compatible(self, *args, **kwargs): # real signature unknown
        """
        Checks if features can be used by `metric.dist` based on their shape.
        
                Basically this method exists so we don't have to do this check
                inside the `metric.dist` function (speedup).
        
                Parameters
                ----------
                shape1 : int, 1-tuple or 2-tuple
                    shape of the first data point's features
                shape2 : int, 1-tuple or 2-tuple
                    shape of the second data point's features
        
                Returns
                -------
                are_compatible : bool
                    whether or not shapes are compatible
        """
        pass

    def dist(self, *args, **kwargs): # real signature unknown
        """
        Computes a distance between two data points based on their features.
        
                Parameters
                ----------
                features1 : 2D array
                    Features of the first data point.
                features2 : 2D array
                    Features of the second data point.
        
                Returns
                -------
                double
                    Distance between two data points.
        """
        pass

    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __reduce__(self, *args, **kwargs): # real signature unknown
        pass

    def __setstate__(self, *args, **kwargs): # real signature unknown
        pass

    feature = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """ `Feature` object used to extract features from sequential data """

    is_order_invariant = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """ Is this metric invariant to the sequence's ordering """


    __pyx_vtable__ = None # (!) real value is '<capsule object NULL at 0x000002DA1A11E0A0>'


class CythonMetric(Metric):
    """
    Computes a distance between two sequential data.
    
        A sequence of N-dimensional points is represented as a 2D array with
        shape (nb_points, nb_dimensions). A `feature` object can be specified
        in order to calculate the distance between extracted features, rather
        than directly between the sequential data.
    
        Parameters
        ----------
        feature : `Feature` object, optional
            It is used to extract features before computing the distance.
    
        Notes
        -----
        When subclassing `CythonMetric`, one only needs to override the `c_dist` and
        `c_are_compatible` methods.
    """
    def are_compatible(self, *args, **kwargs): # real signature unknown
        """
        Checks if features can be used by `metric.dist` based on their shape.
        
                Basically this method exists so we don't have to do this check
                inside method `dist` (speedup).
        
                Parameters
                ----------
                shape1 : int, 1-tuple or 2-tuple
                    Shape of the first data point's features.
                shape2 : int, 1-tuple or 2-tuple
                    Shape of the second data point's features.
        
                Returns
                -------
                bool
                    Whether or not shapes are compatible.
        
                Notes
                -----
                This method calls its Cython version `self.c_are_compatible` accordingly.
        """
        pass

    def dist(self, *args, **kwargs): # real signature unknown
        """
        Computes a distance between two data points based on their features.
        
                Parameters
                ----------
                features1 : 2D array
                    Features of the first data point.
                features2 : 2D array
                    Features of the second data point.
        
                Returns
                -------
                double
                    Distance between two data points.
        
                Notes
                -----
                This method calls its Cython version `self.c_dist` accordingly.
        """
        pass

    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __reduce__(self, *args, **kwargs): # real signature unknown
        pass

    def __setstate__(self, *args, **kwargs): # real signature unknown
        pass

    __pyx_vtable__ = None # (!) real value is '<capsule object NULL at 0x000002DA1A11E100>'


class SumPointwiseEuclideanMetric(CythonMetric):
    """
    Computes the sum of pointwise Euclidean distances between two
        sequential data.
    
        A sequence of N-dimensional points is represented as a 2D array with
        shape (nb_points, nb_dimensions). A `feature` object can be specified
        in order to calculate the distance between the features, rather than
        directly between the sequential data.
    
        Parameters
        ----------
        feature : `Feature` object, optional
            It is used to extract features before computing the distance.
    
        Notes
        -----
        The distance between two 2D sequential data::
    
            s1       s2
    
            0*   a    *0
              \       |
               \      |
               1*     |
                |  b  *1
                |      \
                2*      \
                    c    *2
    
        is equal to $a+b+c$ where $a$ is the Euclidean distance between s1[0] and
        s2[0], $b$ between s1[1] and s2[1] and $c$ between s1[2] and s2[2].
    """
    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __reduce__(self, *args, **kwargs): # real signature unknown
        pass

    def __setstate__(self, *args, **kwargs): # real signature unknown
        pass

    __pyx_vtable__ = None # (!) real value is '<capsule object NULL at 0x000002DA1A11E160>'


class AveragePointwiseEuclideanMetric(SumPointwiseEuclideanMetric):
    """
    Computes the average of pointwise Euclidean distances between two
        sequential data.
    
        A sequence of N-dimensional points is represented as a 2D array with
        shape (nb_points, nb_dimensions). A `feature` object can be specified
        in order to calculate the distance between the features, rather than
        directly between the sequential data.
    
        Parameters
        ----------
        feature : `Feature` object, optional
            It is used to extract features before computing the distance.
    
        Notes
        -----
        The distance between two 2D sequential data::
    
            s1       s2
    
            0*   a    *0
              \       |
               \      |
               1*     |
                |  b  *1
                |      \
                2*      \
                    c    *2
    
        is equal to $(a+b+c)/3$ where $a$ is the Euclidean distance between s1[0] and
        s2[0], $b$ between s1[1] and s2[1] and $c$ between s1[2] and s2[2].
    """
    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __reduce__(self, *args, **kwargs): # real signature unknown
        pass

    def __setstate__(self, *args, **kwargs): # real signature unknown
        pass

    __pyx_vtable__ = None # (!) real value is '<capsule object NULL at 0x000002DA1A11E1C0>'


class CosineMetric(CythonMetric):
    """
    Computes the cosine distance between two vectors.
    
        A vector (i.e. a N-dimensional point) is represented as a 2D array with
        shape (1, nb_dimensions).
    
        Notes
        -----
        The distance between two vectors $v_1$ and $v_2$ is equal to
        $\frac{1}{\pi} \arccos\left(\frac{v_1 \cdot v_2}{\|v_1\| \|v_2\|}\right)$
        and is bounded within $[0,1]$.
    """
    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __reduce__(self, *args, **kwargs): # real signature unknown
        pass

    def __setstate__(self, *args, **kwargs): # real signature unknown
        pass

    __pyx_vtable__ = None # (!) real value is '<capsule object NULL at 0x000002DA1A11E280>'


class MinimumAverageDirectFlipMetric(AveragePointwiseEuclideanMetric):
    """
    Computes the MDF distance (minimum average direct-flip) between two
        sequential data.
    
        A sequence of N-dimensional points is represented as a 2D array with
        shape (nb_points, nb_dimensions).
    
        Notes
        -----
        The distance between two 2D sequential data::
    
            s1       s2
    
            0*   a    *0
              \       |
               \      |
               1*     |
                |  b  *1
                |      \
                2*      \
                    c    *2
    
        is equal to $\min((a+b+c)/3, (a'+b'+c')/3)$ where $a$ is the Euclidean distance
        between s1[0] and s2[0], $b$ between s1[1] and s2[1], $c$ between s1[2]
        and s2[2], $a'$ between s1[0] and s2[2], $b'$ between s1[1] and s2[1]
        and $c'$ between s1[2] and s2[0].
    """
    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __reduce__(self, *args, **kwargs): # real signature unknown
        pass

    def __setstate__(self, *args, **kwargs): # real signature unknown
        pass

    is_order_invariant = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """ Is this metric invariant to the sequence's ordering """


    __pyx_vtable__ = None # (!) real value is '<capsule object NULL at 0x000002DA1A11E220>'


# variables with complex values

__loader__ = None # (!) real value is '<_frozen_importlib_external.ExtensionFileLoader object at 0x000002DA7B1EF610>'

__spec__ = None # (!) real value is "ModuleSpec(name='dipy.segment.metricspeed', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x000002DA7B1EF610>, origin='C:\\\\Users\\\\xukai\\\\Downloads\\\\??2\\\\venv\\\\Lib\\\\site-packages\\\\dipy\\\\segment\\\\metricspeed.cp311-win_amd64.pyd')"

__test__ = {}

