WeightedScorable

Interface used to indicate that the ConfigUnit allows the user to configure how the stage should contribute to the final score, via a weighting policy.

This policy can be seen as an alternative to PerElemScorable. The difference between this and PerElemScorable is:

  • The initial score is always 0.

  • The score per element is fixed in PerElemScorable, whereas this policy allows users to customize the score of each element based on a specified predicate.

Parameters

T

The WeightedScorable.Override concrete class used as predicated score overrides.

Inheritors

Types

Link copied to clipboard
abstract class Override

A score override.

Link copied to clipboard
data class Weighting<T : ConfigUnit.WeightedScorable.Override>(val default: Double, val limit: Double?, val overrides: List<T>?)

The policy for score weighting.

Properties

Link copied to clipboard

The policy to use for score weighting.