[−][src]Trait wybr::outcome::Outcome
Trait representing generic output from an election method
Required methods
fn meta(&self) -> &Metadata
Reference to the election metadata
fn deterministic(&self) -> bool
Specify whether the election was deterministic
In other words, returns false
whenever PRNG was used to settle the election.
In case of ranked pairs method, there is a chance for false negatives, i.e. elections deemed not deterministic while there were.
In case of Meek and Warren methods, determinisms may also depend on the numerical issues due to an use of fixed point arithmetic.
ⓘImportant traits for CandidateIterator<'a>fn elected(&self) -> CandidateIterator
Return iterator of IDs of elected candidates
fn candidate_count(&self) -> usize
ⓘImportant traits for CandidateIterator<'a>fn withdrawn(&self) -> CandidateIterator
Return iterator of IDs of withdrawn candidates
Provided methods
fn elected_count(&self) -> usize
ⓘImportant traits for NamesIterator<'a>fn elected_names(&self) -> NamesIterator
Return iterator of elected candidate names
When there is no name for some candidate (or no names at all), placeholder names featuring 1-based indices of candidates will be generated.
fn winner(&self) -> Option<u32>
Return a single winner ID, if there is one, that is either the election scheme is single winner one or there is one seat in multi-winner election
fn winner_name(&self) -> Option<String>
fn withdrawn_count(&self) -> usize
ⓘImportant traits for NamesIterator<'a>fn withdrawn_names(&self) -> NamesIterator
Return iterator of names of withdrawn candidates