double dshrandom( long ); void FILLIN(double X[], int a, int b, double low, double high) { /* * * * * * * * * * * * * * * * * * * * */ /* Fills in cells of vector X[] */ /* ( locations X[a]... X[b] ) */ /* with strictly increasing real values */ /* that are more than "low" */ /* and less than "high" */ /* * * * * * * * * * * * * * * * * * * * */ int indexrange, index; double valuerange, value; indexrange = b - a; if (indexrange<0) return; index = a + (.26 + .48*dshrandom(0))*(indexrange+1); valuerange = high - low; value = low + (.26 + .48*dshrandom(0))*valuerange; X[index] = value; FILLIN( X, a, index-1, low, value); FILLIN( X, index+1, b, value, high); }