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 void
addMovingStatForPeriod(org.jfree.data.xy.XYSeries result, double x)
Add the moving statistic to the resulting XYSeriesorg.jfree.data.xy.XYSeries
calculateMovingStat(org.jfree.data.xy.XYDataset source, int series, String name, double period, double skip)
Creates a newXYSeries
containing the moving statistic of one series in thesource
dataset.protected abstract void
calculateMovingStatInPeriod(double xx, double yy)
Calculate the current moving statistic with a new pointabstract void
resetMovingStat()
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 newXYSeries
containing the moving statistic of one series in thesource
dataset.- 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
-
-