Searched refs:totalweight (Results 1 – 1 of 1) sorted by relevance
84 int i, j, totalweight; in compute_weight() local87 totalweight = 0; in compute_weight()90 totalweight += d[i]->weight; in compute_weight()92 if (totalweight == 0) in compute_weight()99 chosen[i] = random() % (d[i]->weight * 100 / totalweight); in compute_weight()