com.threerings.tudey.util
Class TruncatedAverage
java.lang.Object
com.threerings.media.util.TrailingAverage
com.threerings.tudey.util.TruncatedAverage
public class TruncatedAverage
- extends com.threerings.media.util.TrailingAverage
Like TrailingAverage, but attempts to exclude outliers
(caused by periodic garbage collection, e.g.) by removing the lowest and highest values.
|
Constructor Summary |
TruncatedAverage()
Creates a new truncated average that records the last ten values and omits the three highest
and lowest when computing the average. |
TruncatedAverage(int history,
int omitLowest,
int omitHighest)
Creates a new truncated average that records the specified number of values and omits the
given number of values at the higher and lower ends. |
| Methods inherited from class com.threerings.media.util.TrailingAverage |
toString |
TruncatedAverage
public TruncatedAverage()
- Creates a new truncated average that records the last ten values and omits the three highest
and lowest when computing the average.
TruncatedAverage
public TruncatedAverage(int history,
int omitLowest,
int omitHighest)
- Creates a new truncated average that records the specified number of values and omits the
given number of values at the higher and lower ends.
record
public void record(int value)
- Overrides:
record in class com.threerings.media.util.TrailingAverage
value
public int value()
- Overrides:
value in class com.threerings.media.util.TrailingAverage
Copyright © 2011. All Rights Reserved.