Package com.github.jelmerk.knn
Interface DistanceFunction<TVector,TDistance>
-
- Type Parameters:
TVector
- Type of the vector to perform distance calculation onTDistance
- 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TDistance
distance(TVector u, TVector v)
Gets the distance between 2 items.
-