All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bbn.bue.common.ScalableAccumulator Maven / Gradle / Ivy

The newest version!
package com.bbn.bue.common;

/**
 * An {@link Accumulator} which can accumulate fractionally (e.g. add half an item).
 * @param 
 */
public interface ScalableAccumulator extends Accumulator {
  /**
   * Adds the provided data to the accumulator, scaled by the provided factor.
   */
  void accumulate(T data, double factor);

  /**
   * Adds all the data previously accumulated to the provided accumulator to this one, scaled
   * by the provided factor.
   * @param accumulator
   */
  void accumulate(Accumulator accumulator, double factor);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy