Displaying 1 result from an estimated 1 matches for "wleft".
Did you mean:
  left
  
2011 Apr 21
0
C source code question (Robustbase edition)
...ictly 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 ~>= 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;/* =^= n/2 +1 with 0-indexing */
	rPsort(a_srt, n, n2);
	trial = a_srt[n2];
	wleft = 0;...