Class Weighted_SumArrayFunction

All Implemented Interfaces:
EventListener, DoubleSource, UpdatableSource
Direct Known Subclasses:
Weighted_SumArrayFunction.Double, Weighted_SumArrayFunction.Integer, Weighted_SumArrayFunction.Long

public abstract class Weighted_SumArrayFunction extends AbstractWeightedArrayFunction implements DoubleSource
This class computes the sum of an array of source values, with each element of the array multiplied by the weight of the source (the source must implement the Weight interface). According to the source data type there are three data-type oriented implementations. Each of them implements always the DoubleSource interface.
  • Constructor Details

    • Weighted_SumArrayFunction

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

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

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