Class AbstractMovingStat
- java.lang.Object
-
- org.ow2.clif.jenkins.chart.movingstatistics.AbstractMovingStat
-
- Direct Known Subclasses:
MovingAverageStat,MovingMaxStat,MovingMedianStat,MovingMinStat,MovingStdDevStat,MovingThroughputStat
public abstract class AbstractMovingStat extends Object
Abtract class to calculate moving statistics.
-
-
Constructor Summary
Constructors Constructor Description AbstractMovingStat()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddMovingStatForPeriod(org.jfree.data.xy.XYSeries result, double x)Add the moving statistic to the resulting XYSeriesorg.jfree.data.xy.XYSeriescalculateMovingStat(org.jfree.data.xy.XYDataset source, int series, String name, double period, double skip)Creates a newXYSeriescontaining the moving statistic of one series in thesourcedataset.protected abstract voidcalculateMovingStatInPeriod(double xx, double yy)Calculate the current moving statistic with a new pointabstract voidresetMovingStat()Reset the movinf statistic just before calculating a new one
-
-
-
Method Detail
-
calculateMovingStat
public org.jfree.data.xy.XYSeries calculateMovingStat(org.jfree.data.xy.XYDataset source, int series, String name, double period, double skip)Creates a newXYSeriescontaining the moving statistic of one series in thesourcedataset.- Parameters:
source- the source dataset.series- the series index (zero based).name- the name for the new series.period- the period.skip- the length of the initial skip period.- Returns:
- The dataset.
-
resetMovingStat
public abstract void resetMovingStat()
Reset the movinf statistic just before calculating a new one
-
calculateMovingStatInPeriod
protected abstract void calculateMovingStatInPeriod(double xx, double yy)Calculate the current moving statistic with a new point- Parameters:
xx- x value of the pointyy- Y value of the point
-
addMovingStatForPeriod
protected abstract void addMovingStatForPeriod(org.jfree.data.xy.XYSeries result, double x)Add the moving statistic to the resulting XYSeries- Parameters:
result- Resulting XYSeriesx- X value where to add the moving statistic
-
-