Expand description
Provides generic traits for election management, weight computation,
and influence calculation using plugin-based models.
The traits include:
ElectionManager: Core election management for candidates.InspectWeight: Provides candidate weight lookup.Influence: Computes influence values from raw input using plugin models.
§Note
Elections are pluggable by design, meaning:
- The inputs generally consist of candidates along with their backing weights (or votes).
- The outputs can be a single candidate or a collection of candidates (stored via an iterator).
Because of this, we define generic plugin-based traits, enabling:
- Multiple election models to be implemented over the same trait interfaces.
- Flexible storage and computation strategies depending on the election logic.
- Strong type-safety while maintaining runtime configurability via plugins.
Traits§
- Election
Manager - A trait for managing elections of candidates with associated weights.
- Influence
- A trait for computing influence, a normalized and comparable metric representing the relative power or importance of an entity.
- Inspect
Weight - Trait for inspecting the weight of a candidate for an upcoming election.