(x, y)
return result
Reduced Euclidean distance.

    Parameters
    ----------
    x: array of shape (embedding_dim,)
    y: array of shape (embedding_dim,)

    Returns
    -------
    The squared euclidean distance between x and y
Reduced Euclidean distance.
Reduced Euclidean distance .
def rdist(x, y):
    """Reduced Euclidean distance.

    Parameters
    ----------
    x: array of shape (embedding_dim,)
    y: array of shape (embedding_dim,)

    Returns
    -------
    The squared euclidean distance between x and y
    """
    result = 0.0
    dim = x.shape[0]
    for i in range(dim):
        diff = x[i] - y[i]
        result += diff * diff

    return result
def rdist ( x , y ) : result = 0.0 dim = x . shape [ 0 ] for i in range ( dim ) : diff = x [ i ] - y [ i ] result += diff * diff return result