Class Weighted_SumArrayFunction.Integer

All Implemented Interfaces:
EventListener, DoubleSource, UpdatableSource
Enclosing class:
Weighted_SumArrayFunction

public static class Weighted_SumArrayFunction.Integer extends Weighted_SumArrayFunction
SumFunction operating on weighted integer source values.
  • Field Details

    • isum

      protected double isum
  • Constructor Details

    • Integer

      public Integer(@NonNull @NonNull WeightedIntArraySource source)
      Create a sum function on a weighted integer array source.
      Parameters:
      source - The weighted data source.
  • Method Details

    • apply

      public void apply(int @NonNull [] data, double @NonNull [] weights)
      Apply the function to the given array of integer values.
      Overrides:
      apply in class AbstractWeightedArrayFunction
      Parameters:
      data - A source array of values.
      weights - An array of weights.
    • getDoubleValue

      public double getDoubleValue(@NonNull @NonNull Enum<?> variableID)
      Returns the double value corresponding to the given variableID
      Parameters:
      variableID - A unique identifier for a variable.
      Returns:
      The current double value of the required variable.