Package dev.dokimos.core.conversation
Enum Class AggregationStrategy
- All Implemented Interfaces:
Serializable,Comparable<AggregationStrategy>,Constable
Strategies for aggregating scores from multiple evaluation criteria.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturns the maximum score across all criteria.Simple arithmetic mean of all scores.Returns the minimum score across all criteria.Weighted mean based on criterion weights. -
Method Summary
Modifier and TypeMethodDescriptionabstract doubleaggregate(List<Map.Entry<EvaluationCriterion, Double>> scores) Aggregates the given criterion scores into a single score.static AggregationStrategyReturns the enum constant of this class with the specified name.static AggregationStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
MEAN
Simple arithmetic mean of all scores. All criteria are weighted equally regardless of their weight values. -
WEIGHTED_MEAN
Weighted mean based on criterion weights. Each criterion's score is multiplied by its weight before averaging. -
MIN
Returns the minimum score across all criteria. This is the strictest aggregation - all criteria must pass for overall success. -
MAX
Returns the maximum score across all criteria. This is the most lenient aggregation - only one criterion needs to pass.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
aggregate
Aggregates the given criterion scores into a single score.- Parameters:
scores- list of criterion-score pairs- Returns:
- the aggregated score
-