Lines Matching full:cluster
48 struct Cluster {
49 Cluster(int sec, size_t s) : next(sec), prev(sec), size(s) {}
72 std::vector<Cluster> clusters;
75 // Maximum amount the combined cluster density can be worse than the original
76 // cluster to consider merging.
102 // output. This messes with the cluster size and density calculations. We
117 Cluster &toC = clusters[to];
123 for (Cluster &c : clusters)
128 static bool isNewDensityBad(Cluster &a, Cluster &b) {
133 // Find the leader of V's belonged cluster (represented as an equivalence
144 static void mergeClusters(std::vector<Cluster> &cs, Cluster &into, int intoIdx,
145 Cluster &from, int fromIdx) {
162 // Cluster indices sorted by density.
175 // The cluster index is the same as the index of its leader here because
176 // clusters[L] has not been merged into another cluster yet.
177 Cluster &c = clusters[l];
184 // Already in the same cluster.
188 Cluster *predC = &clusters[predL];