pub trait DistanceFunction<T, const LANES: usize>: Send + Sync {
// Required method
fn distance(&self, a: &[T], b: &[T]) -> T;
}Expand description
A trait representing a customizable distance function for k-means clustering.
This trait allows you to define your own distance metric to be used in the k-means clustering algorithm.
§Generics
T: The data type of the elements in the slices. This type must support arithmetic operationsLANES: SIMD lane size as requested by the API user