FileDocCategorySizeDatePackage
AverageFactory.javaAPI DocAzureus 3.0.3.42448Tue Mar 21 15:01:34 GMT 2006com.aelitis.azureus.core.util.average

AverageFactory

public abstract class AverageFactory extends Object
Generates different types of averages.

Fields Summary
Constructors Summary
Methods Summary
public static AverageExponentialMovingAverage(int periods)
Create an exponential moving average, smoothing over the given number of periods, using a default smoothing weight value of 2/(1 + periods).

      return new ExponentialMovingAverage(periods);
   
public static AverageExponentialMovingAverage(float weight)
Create an exponential moving average, with the given smoothing weight. Larger weigths (closer to 1.0) will give more influence to recent data and smaller weights (closer to 0.00) will provide smoother averaging (give more influence to older data).

      return new ExponentialMovingAverage(weight);
   
public static AverageMovingAverage(int periods)
Create a moving average, that moves over the given number of periods.

      return new MovingAverage(periods);
   
public static AverageMovingImmediateAverage(int periods)
Create a moving average, that moves over the given number of periods and gives immediate results (i.e. after the first update of X the average will be X

	      return new MovingImmediateAverage(periods);
	   
public static AverageRunningAverage()
Create a simple running average.

      return new RunningAverage();