Enum Class AggregationStrategy

java.lang.Object
java.lang.Enum<AggregationStrategy>
dev.dokimos.core.conversation.AggregationStrategy
All Implemented Interfaces:
Serializable, Comparable<AggregationStrategy>, Constable

public enum AggregationStrategy extends Enum<AggregationStrategy>
Strategies for aggregating scores from multiple evaluation criteria.
  • Enum Constant Details

    • MEAN

      public static final AggregationStrategy MEAN
      Simple arithmetic mean of all scores. All criteria are weighted equally regardless of their weight values.
    • WEIGHTED_MEAN

      public static final AggregationStrategy WEIGHTED_MEAN
      Weighted mean based on criterion weights. Each criterion's score is multiplied by its weight before averaging.
    • MIN

      public static final AggregationStrategy MIN
      Returns the minimum score across all criteria. This is the strictest aggregation - all criteria must pass for overall success.
    • MAX

      public static final AggregationStrategy MAX
      Returns the maximum score across all criteria. This is the most lenient aggregation - only one criterion needs to pass.
  • Method Details

    • values

      public static AggregationStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AggregationStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • aggregate

      public abstract double aggregate(List<Map.Entry<EvaluationCriterion,Double>> scores)
      Aggregates the given criterion scores into a single score.
      Parameters:
      scores - list of criterion-score pairs
      Returns:
      the aggregated score