pub fn kmeans_find_partitions<T: Float + L2 + Dot>(
centroids: &[T],
query: &[T],
nprobes: usize,
distance_type: DistanceType,
) -> Result<UInt32Array>
Expand description
KMeans finds N nearest partitions.
Parameters:
- centroids: a
k * dimension
floating array. - query: a
dimension
floating array. - nprobes: the number of partitions to find.
- distance_type: the distance type to calculate distance.
This function allows to conduct kmeans search without constructing
Arrow Array
or Vec<Float>
types.