public class SlidingWindowHarmonicMeanAccumulator extends AbstractSlidingWindowAccumulator<Double>
Constructor and Description |
---|
SlidingWindowHarmonicMeanAccumulator(int windowSize)
Creates a new harmonic mean accumulator with the sliding window of a given size.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Double number)
Adds a value to the accumulator.
|
Double |
getResult()
Gets the accumulated result of currently added values.
|
reset
public SlidingWindowHarmonicMeanAccumulator(int windowSize)
windowSize
- Size of the sliding window.public void add(Double number)
Accumulator
add
in interface Accumulator<Double>
add
in class AbstractSlidingWindowAccumulator<Double>
number
- The value to be accumulated.public Double getResult()
Accumulator
Copyright © 2010–2017 PerfCake Community. All rights reserved.