Class Weighted_SumArrayFunction.Long

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

public static class Weighted_SumArrayFunction.Long extends Weighted_SumArrayFunction
SumFunction operating on weighted long source values.
  • Field Details

    • lsum

      protected double lsum
  • Constructor Details

    • Long

      public Long(@NonNull @NonNull WeightedLongArraySource source)
      Create a sum function on a weighted long array source.
      Parameters:
      source - The weighted data source.
  • Method Details

    • apply

      public void apply(long @NonNull [] data, double @NonNull [] weights)
      Apply the function to the given array of long 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.