Interface VectorAccumulator


  • public interface VectorAccumulator
    A vector accumulator that accumulates vector's elements.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double accumulate()
      Returns the accumulated value and resets this accumulator.
      void update​(int i, double value)
      Updates a value that was accumulated so far with new vector's element.
    • Method Detail

      • update

        void update​(int i,
                    double value)
        Updates a value that was accumulated so far with new vector's element.
        Parameters:
        i - the element's index
        value - the element's value
      • accumulate

        double accumulate()
        Returns the accumulated value and resets this accumulator.
        Returns:
        the accumulated value