
356
Chapter 19
{
int
iO,
il ;
double xl, yl, xr, yr, thresh, sum ;
shellsort ( nO , sO ) ; // Sort ascending
shellsort ( n1 , s1 ) ;
Γ
We start at the upper right corner (1,1) which corresponds to a thresh-
old of 0 (100 percent of both collections are greater than or equal to 0).
Thus,
the first trapezoid has right base xr=1 and upper right corner
yr=1.
The left base of this trapezoid corresponds to the minimum value
in sO. But... 100 percent of
sO
is greater than or equal to its minimum
value, so the left base of the first trapezoid is xl=1 also! Since our 'first'
trapezoid will always have zero area, skip it. We really start with thresh