@Override public List<T> extractOutput(){
  if (isEmpty()) {
    return Lists.newArrayList();
  }
  long totalCount=unbufferedElements.size();
  for (  QuantileBuffer<T> buffer : buffers) {
    totalCount+=bufferSize * buffer.weight;
  }
  List<QuantileBuffer<T>> all=Lists.newArrayList(buffers);
  if (!unbufferedElements.isEmpty()) {
    Collections.sort(unbufferedElements,compareFn);
    all.add(new QuantileBuffer<>(unbufferedElements));
  }
  double step=1.0 * totalCount / (numQuantiles - 1);
  double offset=(1.0 * totalCount - 1) / (numQuantiles - 1);
  List<T> quantiles=interpolate(all,numQuantiles - 2,step,offset);
  quantiles.add(0,min);
  quantiles.add(max);
  return quantiles;
}

@ Override public List < T > extractOutput ( ) { if ( isEmpty ( ) ) { return Lists . newArrayList ( ) ; } long totalCount = unbufferedElements . size ( ) ; for ( QuantileBuffer < T > buffer : buffers ) { totalCount += bufferSize * buffer . weight ; } List < QuantileBuffer < T > > all = Lists . newArrayList ( buffers ) ; if ( ! unbufferedElements . isEmpty ( ) ) { Collections . sort ( unbufferedElements , compareFn ) ; all . add ( new QuantileBuffer < > ( unbufferedElements ) ) ; } double step = 1.0 * totalCount / ( numQuantiles - 1 ) ; double offset = ( 1.0 * totalCount - 1 ) / ( numQuantiles - 1 ) ; List < T > quantiles = interpolate ( all , numQuantiles - 2 , step , offset ) ; quantiles . add ( 0 , min ) ; quantiles . add ( max ) ; return quantiles ; }
outputs numquantiles elements consisting of the minimum , maximum , and numquantiles - 2 evenly spaced intermediate elements . < p > returns the empty list if no elements have been added .
