Interface DistanceFunction<TVector,​TDistance>

  • Type Parameters:
    TVector - Type of the vector to perform distance calculation on
    TDistance - Type of distance between items (expect any numeric type: float, double, int, ..)
    All Superinterfaces:
    Serializable
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface DistanceFunction<TVector,​TDistance>
    extends Serializable
    Calculates distance between 2 items.
    • Method Detail

      • distance

        TDistance distance​(TVector u,
                           TVector v)
        Gets the distance between 2 items.
        Parameters:
        u - from item
        v - to item
        Returns:
        The distance between items.