Class Weighted_SumArrayFunction.Double

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

public static class Weighted_SumArrayFunction.Double extends Weighted_SumArrayFunction
SumFunction operating on weighted double source values.
  • Field Details

    • dsum

      protected double dsum
  • Constructor Details

    • Double

      public Double(@NonNull @NonNull WeightedDoubleArraySource source)
      Create a sum function on a weighted double array source.
      Parameters:
      source - The data source.
  • Method Details

    • apply

      public void apply(double @NonNull [] data, double @NonNull [] weights)
      Apply the function to the given array of double 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<?> id)
      Returns the double value corresponding to the given variableID
      Parameters:
      id - A unique identifier for a variable.
      Returns:
      The current double value of the required variable.