Class AbstractMovingStat
java.lang.Object
org.ow2.clif.jenkins.chart.movingstatistics.AbstractMovingStat
- Direct Known Subclasses:
MovingAverageStat,MovingMaxStat,MovingMedianStat,MovingMinStat,MovingStdDevStat,MovingThroughputStat
Abtract class to calculate moving statistics.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 voidReset the movinf statistic just before calculating a new one
-
Constructor Details
-
AbstractMovingStat
public AbstractMovingStat()
-
-
Method Details
-
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
-