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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    addMovingStatForPeriod(org.jfree.data.xy.XYSeries result, double x)
    Add the moving statistic to the resulting XYSeries
    org.jfree.data.xy.XYSeries
    calculateMovingStat(org.jfree.data.xy.XYDataset source, int series, String name, double period, double skip)
    Creates a new XYSeries containing the moving statistic of one series in the source dataset.
    protected abstract void
    calculateMovingStatInPeriod(double xx, double yy)
    Calculate the current moving statistic with a new point
    abstract void
    Reset the movinf statistic just before calculating a new one

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 new XYSeries containing the moving statistic of one series in the source 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 point
      yy - 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 XYSeries
      x - X value where to add the moving statistic