Package edu.byu.hbll.box.internal.util
Class SmoothedAverage
- java.lang.Object
-
- edu.byu.hbll.box.internal.util.SmoothedAverage
-
public class SmoothedAverage extends Object
Used for statistics.- Author:
- Charles Draper
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_SMOOTHING_FACTOR
-
Constructor Summary
Constructors Constructor Description SmoothedAverage()
Creates a newSmoothedAverage
with the default smoothing factor.SmoothedAverage(double smoothingFactor)
Creates a newSmoothedAverage
with the given smoothing factor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(double addend)
Adds a new value to this statistic.double
get()
Returns the smoothed average.
-
-
-
Field Detail
-
DEFAULT_SMOOTHING_FACTOR
public static final double DEFAULT_SMOOTHING_FACTOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SmoothedAverage
public SmoothedAverage()
Creates a newSmoothedAverage
with the default smoothing factor.
-
SmoothedAverage
public SmoothedAverage(double smoothingFactor)
Creates a newSmoothedAverage
with the given smoothing factor.- Parameters:
smoothingFactor
- the smoothing factor
-
-