Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
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 DoubleHistogram values in linear steps. The iteration is performed in steps of valueUnitsPerBucket in size, terminating when all recorded histogram values are exhausted. Note that each iteration "bucket" includes values up to and including the next bucket boundary value.
    private final LinearIterator integerLinearIterator;
    DoubleHistogram histogram;

    
Reset iterator for re-use in a fresh iteration over the same histogram data set.

Parameters:
valueUnitsPerBucket The size (in value units) of each bucket iteration.
    public void reset(final double valueUnitsPerBucket) {
        .reset((long) (valueUnitsPerBucket * .));
    }

    

Parameters:
histogram The histogram this iterator will operate on
valueUnitsPerBucket The size (in value units) of each bucket iteration.
    public DoubleLinearIterator(final DoubleHistogram histogramfinal double valueUnitsPerBucket) {
        this. = histogram;
         = new LinearIterator(
                histogram.integerValuesHistogram,
                (long) (valueUnitsPerBucket * histogram.doubleToIntegerValueConversionRatio)
        );
    }
    @Override
    public boolean hasNext() {
        return .hasNext();
    }
    @Override
        .next();
        return ;
    }
    @Override
    public void remove() {
        .remove();
    }
New to GrepCode? Check out our FAQ X