Interface VectorAccumulator


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

    Modifier and Type
    Method
    Description
    double
    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 Details

    • 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