code: public static Bucket constantRangeBucket(Bucket bkt, ConstantRange cRange) {
  		ConstantRange newRange = bkt.valueRange().intersect(cRange);
  		if (!newRange.isValid())
  			return null;
  		double newDistVals = bkt.distinctValues(newRange);
  		if (Double.compare(newDistVals, 1.0) < 0)
  			return null;
  		double newFreq = bkt.frequency() * newDistVals / bkt.distinctValues();
  		if (bkt.valuePercentiles() == null)
  			return new Bucket(newRange, newFreq, newDistVals);
  		Percentiles newPcts = bkt.valuePercentiles().percentiles(newRange);
  		return new Bucket(newRange, newFreq, newDistVals, newPcts);
  	}
docs: Creates a new bucket by keeping the statistics of records and values in
  the specified bucket falling within the specified search range.
  
  <p>
  Assumes that:
  <ul>
  <li>Equality selection always finds matching records</li>
  <li>Values in a bucket have the same frequency (uniform frequency)</li>
  </ul>
  
  @param bkt
  the input bucket
  @param cRange
  the search range
  @return a new bucket that keeps the statistics of records and values
  falling within the specified search range