Expand description
Contains FlatElection plugin models, which rank entities using a single aggregated scalar (flat weight) computed from a list of entities and their corresponding weights.
In this model:
- Each entity is represented as a
(entity, flat_weight)pair. - Individual contributions are not tracked separately; only the total flat weight per entity matters.
- The plugin takes the list of entities with their flat weights and produces a ranked output.
§Characteristics
- Requires a list of entities with their flat weights as input.
- Produces a sorted list of entities according to their flat weight.
- Ignores the structure or distribution of contributions, focusing purely on the aggregated value.
§Example Flow
- Prepare a list of entities with their flat weights:
[(entity1, w1), (entity2, w2), ...]. - Pass this list to a FlatElection plugin model.
- The model sorts and outputs entities in descending order of flat weight.
Structs§
- Threshold
Flat Model - The ThresholdFlat model filters candidates based on a minimum flat weight threshold. Only candidates whose weight meets or exceeds the threshold are included in the output.
- Threshold
Flat Model Config - Context Config for Plugin Model
ThresholdFlatModel - TopDown
Flat Model - The TopDownFlat model ranks candidates based solely on their aggregated flat weight. Each candidate’s score represents the total support or stake they possess.