HistogramBin bin; if (i == bins - 1) { bin = new HistogramBin(lower, maximum*(1.0 + EPS)); } else { double upper = minimum + (double)(i + 1) * binWidth; bin = new HistogramBin(lower, upper); lower = upper;
HistogramBin bin; if (i == bins - 1) { bin = new HistogramBin(lower, maximum*(1.0 + EPS)); } else { double upper = minimum + (double)(i + 1) * binWidth; bin = new HistogramBin(lower, upper); lower = upper;
bin = new HistogramBin(lower, maximum); bin = new HistogramBin(lower, upper); lower = upper;
/** * Synchronize values to bins. Compute bins values. * * @param bins List of bins. * @param values List of values. */ private void synchronizeValuesAndBins(List bins, List values) { ListIterator iterBins = bins.listIterator(0); ListIterator iterValues = values.listIterator(); HistogramBin bin; for (; iterBins.hasNext(); iterBins.set( new HistogramBin(bin.getStartBoundary(), bin.getEndBoundary()))) bin = (HistogramBin)iterBins.next(); iterBins = bins.listIterator(0); while (iterValues.hasNext()) { double currentValue = ((Double)iterValues.next()).doubleValue(); boolean continu = true; iterBins = bins.listIterator(0); while (continu && iterBins.hasNext()) { HistogramBin tempBin = (HistogramBin)iterBins.next(); if (currentValue >= tempBin.getStartBoundary() && currentValue < tempBin.getEndBoundary()) { tempBin.incrementCount(); continu = false; } } } }
bin = new HistogramBin(lower, maximum); bin = new HistogramBin(lower, upper); lower = upper;