Function flechasdb::kmeans::cluster_with_events
source · pub fn cluster_with_events<T, VS, EV>(
vs: &VS,
k: NonZeroUsize,
event_handler: EV
) -> Result<Codebook<T>, Error>where
T: Scalar,
VS: VectorSet<T>,
EV: FnMut(ClusterEvent<'_, T>),Expand description
Performs k-means clustering.
Fails if vs has fewer vectors than k.