public class DoublePercentileIterator extends java.lang.Object implements java.util.Iterator<DoubleHistogramIterationValue>
DoubleHistogram
values values according to percentile levels. The iteration is
performed in steps that start at 0% and reduce their distance to 100% according to the
percentileTicksPerHalfDistance parameter, ultimately reaching 100% when all recorded histogram
values are exhausted.Modifier and Type | Field and Description |
---|---|
(package private) DoubleHistogram |
histogram |
private PercentileIterator |
integerPercentileIterator |
private DoubleHistogramIterationValue |
iterationValue |
Constructor and Description |
---|
DoublePercentileIterator(DoubleHistogram histogram,
int percentileTicksPerHalfDistance) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
DoubleHistogramIterationValue |
next() |
void |
remove() |
void |
reset(int percentileTicksPerHalfDistance)
Reset iterator for re-use in a fresh iteration over the same histogram data set.
|
private final PercentileIterator integerPercentileIterator
private final DoubleHistogramIterationValue iterationValue
DoubleHistogram histogram
public DoublePercentileIterator(DoubleHistogram histogram, int percentileTicksPerHalfDistance)
histogram
- The histogram this iterator will operate onpercentileTicksPerHalfDistance
- The number of iteration steps per half-distance to 100%.public void reset(int percentileTicksPerHalfDistance)
percentileTicksPerHalfDistance
- The number of iteration steps per half-distance to 100%.public boolean hasNext()
hasNext
in interface java.util.Iterator<DoubleHistogramIterationValue>
public DoubleHistogramIterationValue next()
next
in interface java.util.Iterator<DoubleHistogramIterationValue>
public void remove()
remove
in interface java.util.Iterator<DoubleHistogramIterationValue>