|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aelitis.azureus.core.util.average.AverageFactory
public abstract class AverageFactory
Generates different types of averages.
Nested Class Summary | |
---|---|
static interface |
AverageFactory.LazyMovingImmediateAverageAdapter<T>
|
static class |
AverageFactory.LazyMovingImmediateAverageState
|
Constructor Summary | |
---|---|
AverageFactory()
|
Method Summary | ||
---|---|---|
static ExponentialMovingAverage |
ExponentialMovingAverage(float weight)
Create an exponential moving average, with the given smoothing weight. |
|
static ExponentialMovingAverage |
ExponentialMovingAverage(int periods)
Create an exponential moving average, smoothing over the given number of periods, using a default smoothing weight value of 2/(1 + periods). |
|
static
|
LazyMovingImmediateAverage(int periods,
int interval_secs,
AverageFactory.LazyMovingImmediateAverageAdapter<T> adapter,
T instance)
|
|
static
|
LazySmoothMovingImmediateAverage(AverageFactory.LazyMovingImmediateAverageAdapter<T> adapter,
T instance)
Creates an auto-updating immediate moving average that will auto-deactivate average maintenance when values are not being extracted from it, auto-reactivate when required etc. |
|
static MovingAverage |
MovingAverage(int periods)
Create a moving average, that moves over the given number of periods. |
|
static MovingImmediateAverage |
MovingImmediateAverage(int periods)
Create a moving average, that moves over the given number of periods and gives immediate results (i.e. |
|
static RunningAverage |
RunningAverage()
Create a simple running average. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AverageFactory()
Method Detail |
---|
public static RunningAverage RunningAverage()
public static MovingAverage MovingAverage(int periods)
public static MovingImmediateAverage MovingImmediateAverage(int periods)
public static ExponentialMovingAverage ExponentialMovingAverage(int periods)
public static ExponentialMovingAverage ExponentialMovingAverage(float weight)
public static <T> long LazySmoothMovingImmediateAverage(AverageFactory.LazyMovingImmediateAverageAdapter<T> adapter, T instance)
periods
- adapter
- instance
-
public static <T> long LazyMovingImmediateAverage(int periods, int interval_secs, AverageFactory.LazyMovingImmediateAverageAdapter<T> adapter, T instance)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |