pub struct CondorcetTally<T, C = u64>where
    T: Eq + Clone + Hash,
    C: Copy + PartialOrd + AddAssign + Num + NumCast,
{ /* private fields */ }

Implementations§

Build a graph representing all pairwise competitions between all candidates.

Each candidate is assigned a node, vertexes between nodes contain a tuple of counts. Vertexes are directional, leading from the more preferred candidate to the less prefered candidate. The first element of tuple is the number votes where the first candidate is prefered to the second. The second element of the tuple is the number of votes where the second candidate is prefered to the first. The first element in the tuple is always greater than or equal to the second element in the tuple.

If both candidates are equally prefered, two vertexes are created, one going in each direction.

Image Source: [https://arxiv.org/pdf/1804.02973.pdf](https://arxiv.org/pdf/1804.02973.pdf)

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.