Function compute_partitions

Source
pub fn compute_partitions<T: ArrowNumericType, K: KMeansAlgo<T::Native>>(
    centroids: &PrimitiveArray<T>,
    vectors: &PrimitiveArray<T>,
    dimension: impl AsPrimitive<usize>,
    distance_type: DistanceType,
) -> Vec<Option<u32>>
where T::Native: Num,
Expand description

Compute partition ID of each vector in the KMeans.

If returns None, means the vector is not valid, i.e., all NaN.