pub trait MJVotes {
// Required methods
fn nth_median(&self, n: usize) -> Option<usize>;
fn vote_cmp(&self, other: &Self) -> Ordering;
}
Required Methods§
fn nth_median(&self, n: usize) -> Option<usize>
fn vote_cmp(&self, other: &Self) -> Ordering
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl MJVotes for Vec<usize>
impl MJVotes for Vec<usize>
Source§fn nth_median(&self, n: usize) -> Option<usize>
fn nth_median(&self, n: usize) -> Option<usize>
Return the “nth” median of the votes. The 0th median is the median in the traditionnal sense, the other are neighboring medians used for tie-breaking as defined by the Majority Judgement https://en.wikipedia.org/wiki/Majority_judgment#Voting_process