@Override
	public long[] getBinnedDistribution(long min, long max, int numBins) {
		Set<T> data = freqTable.keySet();
		long[] result = new long[numBins];
		long delta = max - min;

		double binSize = (double) delta / numBins;

		for (T d : data) {
			int bin = (int) ((d.doubleValue() - min) / binSize);
			if (bin < 0) { /* this data is smaller than min */
			} else if (bin > numBins) { /* this data point is bigger than max */
			} else if (bin == numBins) { /*
										 * last element will be included in the
										 * last bin
										 */
				result[--bin] += freqTable.get(d);
			} else {
				result[bin] += freqTable.get(d);
			}
		}
		return result;
	}