Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
LogarithmicIterator.java Written by Gil Tene of Azul Systems, and released to the public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/

Author(s):
Gil Tene
 
 
 package org.HdrHistogram;
Used for iterating through histogram 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.
    double logBase;
Reset iterator for re-use in a fresh iteration over the same histogram data set.

Parameters:
valueUnitsInFirstBucket the size (in value units) of the first value bucket step
logBase the multiplier by which the bucket size is expanded in each iteration step.
    public void reset(final int valueUnitsInFirstBucketfinal double logBase) {
        reset(valueUnitsInFirstBucketlogBase);
    }
    private void reset(final AbstractHistogram histogramfinal int valueUnitsInFirstBucketfinal double logBase) {
        super.resetIterator(histogram);
        this. = logBase;
        this. = valueUnitsInFirstBucket;
        this. = valueUnitsInFirstBucket;
    }

    

Parameters:
histogram The histogram this iterator will operate on
valueUnitsInFirstBucket the size (in value units) of the first value bucket step
logBase the multiplier by which the bucket size is expanded in each iteration step.
    public LogarithmicIterator(final AbstractHistogram histogramfinal int valueUnitsInFirstBucketfinal int logBase) {
        reset(histogramvalueUnitsInFirstBucketlogBase);
    }
    @Override
    public boolean hasNext() {
        return (super.hasNext() || ( != 0));
    }
    @Override
    void incrementIterationLevel() {
         *= ;
    }
    @Override
    long getValueIteratedTo() {
        return ;
    }
    @Override
    boolean reachedIterationLevel() {
    }
New to GrepCode? Check out our FAQ X