Class AbstractMovingStat

    • Constructor Detail

      • AbstractMovingStat

        public AbstractMovingStat()
    • 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 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