Lines Matching refs:idx2
12 /* Computes the bit cost reduction by combining out[idx1] and out[idx2] and if
13 it is below a threshold, stores the pair (idx1, idx2) in the *pairs queue. */
16 uint32_t idx2, size_t max_num_pairs, HistogramPair* pairs,
20 p.idx1 = p.idx2 = 0;
22 if (idx1 == idx2) {
25 if (idx2 < idx1) {
26 uint32_t t = idx2;
27 idx2 = idx1;
31 p.idx2 = idx2;
32 p.cost_diff = 0.5 * ClusterCostDiff(cluster_size[idx1], cluster_size[idx2]);
34 p.cost_diff -= out[idx2].bit_cost_;
37 p.cost_combo = out[idx2].bit_cost_;
39 } else if (out[idx2].total_count_ == 0) {
47 FN(HistogramAddHistogram)(&combo, &out[idx2]);
88 size_t idx2;
89 for (idx2 = idx1 + 1; idx2 < num_clusters; ++idx2) {
91 clusters[idx2], max_num_pairs, &pairs[0], &num_pairs);
107 best_idx2 = pairs[0].idx2;
129 if (p->idx1 == best_idx1 || p->idx2 == best_idx1 ||
130 p->idx1 == best_idx2 || p->idx2 == best_idx2) {