Type Parameters:
T - feature input-type of all features in the list, as well as the returned result.

public class Sum<T extends FeatureInput> extends FeatureFromList<T>
Sums the results after calculating a list of Features.
Author:
Owen Feehan
  • Constructor Details

    • Sum

      public Sum(FeatureList<T> features)
      Create with a list of Features which become summed.
      Parameters:
      features - the features.
    • Sum

      public Sum()
  • Method Details

    • calculate

      public double calculate(FeatureCalculationInput<T> input) throws FeatureCalculationException
      Description copied from class: Feature
      Calculates a value for some input.
      Specified by:
      calculate in class Feature<T extends FeatureInput>
      Parameters:
      input - the input to the calculation.
      Returns:
      the result of the calculation.
      Throws:
      FeatureCalculationException - if the calculation cannot successfully complete.
    • descriptionLong

      public String descriptionLong()
      Description copied from class: Feature
      A long human-readable description of the feature and some or all of its parameterization.

      This can be overwritten to create an alternative description for features. By default string returned by Feature.describeBean() is used.

      Overrides:
      descriptionLong in class Feature<T extends FeatureInput>
      Returns:
      the description.
    • isIgnoreNaN

      public boolean isIgnoreNaN()
      If true, we ignore any NaN values. Otherwise the sum becomes NaN
    • setIgnoreNaN

      public void setIgnoreNaN(boolean ignoreNaN)
      If true, we ignore any NaN values. Otherwise the sum becomes NaN