pub fn check_for_ties_and_resolve(&mut self,to_check:&mut [CandidateIndex],how:MethodOfTieResolution,granularity:TieResolutionGranularityNeeded) {
        // let mut to_check = &mut self.continuing_candidates_sorted_by_tally[to_check];
        let mut i:usize = 0;
        while i<to_check.len() {
            let mut differs = i+1;
            while differs<to_check.len() && self.tally(to_check[i])==self.tally(to_check[differs]) { differs+=1; }
            if differs!=i+1 { // we have a few with identical tallies
                let tied = &mut to_check[i..differs];
                if let Some(decision) = how.resolve(tied,&self.transcript,granularity) {
                    self.in_this_count.decisions.push(decision);
                    self.ec_resolutions.resolve(tied,granularity);
                }
            }
            i=differs;
        }
    }
/// See if there are any ties in the tallys for the candidates in
/// to_check (which should be already sorted by tally). If there are,
/// resolve them, first using "how", secondly using self.ec_resolutions.
/// Re-orders to_check to be in the appropriate order.
See if there are any ties in the tallys for the candidates in
to_check (which should be already sorted by tally). If there are,
resolve them, first using "how", secondly using self.ec_resolutions.
Re-orders to_check to be in the appropriate order.
See if there are any ties in the tallys for the candidates in to_check ( which should be already sorted by tally ) . If there are resolve them first using " how " secondly using self . ec_resolutions . Re - orders to_check to be in the appropriate order .
pub fn check_for_ties_and_resolve(&mut self,to_check:&mut [CandidateIndex],how:MethodOfTieResolution,granularity:TieResolutionGranularityNeeded) {
        // let mut to_check = &mut self.continuing_candidates_sorted_by_tally[to_check];
        let mut i:usize = 0;
        while i<to_check.len() {
            let mut differs = i+1;
            while differs<to_check.len() && self.tally(to_check[i])==self.tally(to_check[differs]) { differs+=1; }
            if differs!=i+1 { // we have a few with identical tallies
                let tied = &mut to_check[i..differs];
                if let Some(decision) = how.resolve(tied,&self.transcript,granularity) {
                    self.in_this_count.decisions.push(decision);
                    self.ec_resolutions.resolve(tied,granularity);
                }
            }
            i=differs;
        }
    }
pub fn check_for_ties_and_resolve ( & mut self , to_check : & mut [ CandidateIndex ] , how : MethodOfTieResolution , granularity : TieResolutionGranularityNeeded ) { // let mut to_check = &mut self.continuing_candidates_sorted_by_tally[to_check]; let mut i : usize = 0 ; while i < to_check . len ( ) { let mut differs = i + 1 ; while differs < to_check . len ( ) && self . tally ( to_check [ i ] ) == self . tally ( to_check [ differs ] ) { differs += 1 ; } if differs != i + 1 { // we have a few with identical tallies let tied = & mut to_check [ i .. differs ] ; if let Some ( decision ) = how . resolve ( tied , & self . transcript , granularity ) { self . in_this_count . decisions . push ( decision ) ; self . ec_resolutions . resolve ( tied , granularity ) ; } } i = differs ; } }
See if there are any ties in the tallys for the candidates in
to_check (which should be already sorted by tally).
See if there are any ties in the tallys for the candidates in to_check ( which should be already sorted by tally ) .
&mut self
to_check
&mut [CandidateIndex]
how
MethodOfTieResolution
granularity
TieResolutionGranularityNeeded
&mut self
to_check
&mut [CandidateIndex]
how
MethodOfTieResolution
granularity
TieResolutionGranularityNeeded