Class AbstractStatistics.SMA

    • Constructor Detail

      • SMA

        public SMA​(int length)
        Parameters:
        length - the maximum length
    • Method Detail

      • currentAverage

        public double currentAverage()
      • compute

        public double compute​(double value)
        Compute the moving average. Synchronised so that no changes in the underlying data is made during calculation.
        Parameters:
        value - The value
        Returns:
        The average