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.
Calculates distance between 2 vectors.
-
Method Summary
-
Method Details
-
distance
Gets the distance between 2 items.- Parameters:
u
- from itemv
- to item- Returns:
- The distance between items.
-