RuleScore(*args, tie_break: whalrus.priorities.priority.Priority = Priority.UNAMBIGUOUS, converter: whalrus.converters_ballot.converter_ballot.ConverterBallot = None, **kwargs)¶
A voting rule with scores (which are not necessarily numbers).
Each candidate is assigned a score (not necessarily a number), and the the cowinners are the candidates with the best score, in the sense defined by
The best score.
compare_scores(one: object, another: object) → int¶
Compare two scores.
- one (object) – A score.
- another (object) – A score.
0 if they are equal, a positive number if
oneis greater than
another, a negative number otherwise.
Number of candidates.
Result of the election as a (weak) order over the candidates. It is a list of
NiceSet. The first set contains the candidates that have the best score, the second set contains those with the second best score, etc.
The scores. To each candidate, this dictionary assigns a score (non necessarily a number).
Result of the election as a strict order over the candidates. The first element is the winner, etc. This may use the tie-breaking rule.
The worst score.