pub fn assign_rows_to_clusters(
dendrogram: &Dendrogram,
assignments: &mut Vec<usize>,
max_cluster_size: usize,
) -> usizeExpand description
This assigns a cluster number to each row under the constraint that all clusters must have the same size or be smaller than the provided size.
§Arguments
dendrogram- The dendogram returned by create_dendrogram.assignments- cluster number for each row. This is passed as an argument for you to be able to reuse the vector across multiple calls. The vector will be resized if too small.max_cluster_size- The maximum size of the returned clusters.
§Returns
The number of clusters found.