public class DoubleLogarithmicIterator extends java.lang.Object implements java.util.Iterator<DoubleHistogramIterationValue>
DoubleHistogram
values values in logarithmically increasing levels. The
iteration is performed in steps that start at valueUnitsInFirstBucket and increase exponentially according to
logBase, terminating when all recorded histogram values are exhausted. Note that each iteration "bucket"
includes values up to and including the next bucket boundary value.Modifier and Type | Field and Description |
---|---|
(package private) DoubleHistogram |
histogram |
private LogarithmicIterator |
integerLogarithmicIterator |
private DoubleHistogramIterationValue |
iterationValue |
Constructor and Description |
---|
DoubleLogarithmicIterator(DoubleHistogram histogram,
double valueUnitsInFirstBucket,
double logBase) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
DoubleHistogramIterationValue |
next() |
void |
remove() |
void |
reset(double valueUnitsInFirstBucket,
double logBase)
Reset iterator for re-use in a fresh iteration over the same histogram data set.
|
private final LogarithmicIterator integerLogarithmicIterator
private final DoubleHistogramIterationValue iterationValue
DoubleHistogram histogram
public DoubleLogarithmicIterator(DoubleHistogram histogram, double valueUnitsInFirstBucket, double logBase)
histogram
- The histogram this iterator will operate onvalueUnitsInFirstBucket
- the size (in value units) of the first value bucket steplogBase
- the multiplier by which the bucket size is expanded in each iteration step.public void reset(double valueUnitsInFirstBucket, double logBase)
valueUnitsInFirstBucket
- the size (in value units) of the first value bucket steplogBase
- the multiplier by which the bucket size is expanded in each iteration step.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>