mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
refactor election score (#10834)
* refactor election score * Test for ord * remove reference * vec -> slice * change iter to iter_by_significance * improve doc * fix typo * add explanation about [u128; 3] * consolidate threshold and epsilon * random fixes * rename * remove Into * make iter_by_sig private * remove vec * Fix tests
This commit is contained in:
@@ -55,7 +55,7 @@ use traits::{BaseArithmetic, One, SaturatedConversion, Unsigned, Zero};
|
||||
/// - `Ordering::Equal` otherwise.
|
||||
pub trait ThresholdOrd<T> {
|
||||
/// Compare if `self` is `threshold` greater or less than `other`.
|
||||
fn tcmp(&self, other: &T, epsilon: T) -> Ordering;
|
||||
fn tcmp(&self, other: &T, threshold: T) -> Ordering;
|
||||
}
|
||||
|
||||
impl<T> ThresholdOrd<T> for T
|
||||
|
||||
Reference in New Issue
Block a user