[−][src]Module wybr::methods::schulze
Schulze method
Schulze method expands the beat graph with widest beat-paths between candidates, and then attempts to find a Condorcet winner.
Examples
use wybr::{Tally,Schulze,Outcome}; //Load the Tennessee Wikipedia example let tally=Tally::from_blt_file("examples/tennessee.blt").unwrap(); //Perform simple election with default parameters let outcome=Schulze::new(&tally).run().unwrap(); assert_eq!(outcome.winner_name().unwrap(),"Nashville"); //Change pair score to `Margin`; this won't change the outcome, though use wybr::PairScore; let outcome=Schulze::new(&tally).pair_score(PairScore::Margin).run().unwrap(); assert_eq!(outcome.winner_name().unwrap(),"Nashville");
Structs
Schulze |