pub fn add_change(&mut self,change:ElectionChange<Tally>,verbose:bool) {
        if verbose { println!("Recorder given a change of {} ballots",change.ballots.n); }
        for existing in &self.changes {
            if change.is_dominated_by_or_equivalent_to(existing) { return; } // no point keeping it.
        }
        // see if any existing should be removed
        self.changes.retain(|existing|!existing.is_dominated_by_or_equivalent_to(&change));
        if verbose { println!("This is a new personal best."); }
        self.changes.push(change);
    }
/// Add a change, if there is no strictly better one already known.
Add a change, if there is no strictly better one already known.
Add a change if there is no strictly better one already known .
pub fn add_change(&mut self,change:ElectionChange<Tally>,verbose:bool) {
        if verbose { println!("Recorder given a change of {} ballots",change.ballots.n); }
        for existing in &self.changes {
            if change.is_dominated_by_or_equivalent_to(existing) { return; } // no point keeping it.
        }
        // see if any existing should be removed
        self.changes.retain(|existing|!existing.is_dominated_by_or_equivalent_to(&change));
        if verbose { println!("This is a new personal best."); }
        self.changes.push(change);
    }
pub fn add_change ( & mut self , change : ElectionChange < Tally > , verbose : bool ) { if verbose { println ! ( " " change ballots n ) ; } for existing in & self . changes { if change . is_dominated_by_or_equivalent_to ( existing ) { return ; } // no point keeping it. } // see if any existing should be removed self . changes . retain ( | existing | ! existing . is_dominated_by_or_equivalent_to ( & change ) ) ; if verbose { println ! ( " " ) ; } self . changes . push ( change ) ; }
Add a change, if there is no strictly better one already known.
Add a change if there is no strictly better one already known .
&mut self
change
ElectionChange<Tally>
verbose
bool
&mut self
change
ElectionChange<Tally>
verbose
bool