protected void zsort (Vector v, int lo0, int hi0)
  {
    int lo = lo0;
    int hi = hi0;
    double mid;
    if  (hi0 > lo0)
      {
	mid = ((dlentry) v.elementAt ((lo0 + hi0) / 2)).zvalue ();
	while (lo <= hi)
	  {
	    while ((lo < hi0) &&
		   (((dlentry) v.elementAt (lo)).zvalue () < mid))
	      ++lo;
	    while ((hi > lo0) &&
		   (((dlentry) v.elementAt (hi)).zvalue () > mid))
	      --hi;
            if (lo <= hi)
	      {
		Object temp;
		temp = v.elementAt (lo);
		v.setElementAt (v.elementAt (hi), lo);
		v.setElementAt (temp, hi);
		++lo;
		--hi;
	      }
	  }
	if (lo0 < hi)
	  zsort (v, lo0, hi);
	if (lo < hi0)
	  zsort (v, lo, hi0);
      }
  }