search for: kcand

Displaying 1 result from an estimated 1 matches for "kcand".

Did you mean: cand
2011 Apr 21
0
C source code question (Robustbase edition)
...as the smallest a[j] such that the sum of the weights of all a[i] &lt;= a[j] is strictly greater than half of the total weight. Arguments: a: double array containing the observations n: number of observations w: array of (int/double) weights of the observations. */ int n2, i, kcand; /* sum of weights: `int' do overflow when n ~&gt;= 1e5 */ double wleft, wmid, wright, w_tot, wrest; double trial; w_tot = 0; for (i = 0; i < n; ++i) w_tot += w[i]; wrest = 0; /* REPEAT : */ do { for (i = 0; i < n; ++i) a_srt[i] = a[i]; n2 = n/2...