public void allocate(int num_bins) {
    nbins = num_bins;
    bins = new ArrayList<Coord>();
    nusedbins = 0;
  }
Sets the number of histogram bins to use for approximating data.

@param num_bins Number of non-uniform-width histogram bins to use
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NumericHistogram.java