fn compute_vote_addition<Rules:PreferenceDistributionRules>(to_candidate: CandidateIndex, next_largest: CandidateIndex, count: &SingleCount<Rules::Tally>,verbose:bool) -> VoteChange<Rules::Tally> {
    let vote_difference = count.status.tallies.candidate[next_largest.0].clone() - count.status.tallies.candidate[to_candidate.0].clone();
    if verbose { println!("Vote difference: {}", vote_difference); }
    return VoteChange {
        vote_value: vote_difference+Rules::Tally::from(1), // could probably be improved to minimum increment above self.
        from: None,
        to: Some(to_candidate)
    }
}
/// Find an addition that makes to_candidate have a higher number of votes that next_largest.
/// Used to make the current candidate be eliminated.
Find an addition that makes to_candidate have a higher number of votes that next_largest.
Used to make the current candidate be eliminated.
Find an addition that makes to_candidate have a higher number of votes that next_largest . Used to make the current candidate be eliminated .
fn compute_vote_addition<Rules:PreferenceDistributionRules>(to_candidate: CandidateIndex, next_largest: CandidateIndex, count: &SingleCount<Rules::Tally>,verbose:bool) -> VoteChange<Rules::Tally> {
    let vote_difference = count.status.tallies.candidate[next_largest.0].clone() - count.status.tallies.candidate[to_candidate.0].clone();
    if verbose { println!("Vote difference: {}", vote_difference); }
    return VoteChange {
        vote_value: vote_difference+Rules::Tally::from(1), // could probably be improved to minimum increment above self.
        from: None,
        to: Some(to_candidate)
    }
}
fn compute_vote_addition < Rules : PreferenceDistributionRules > ( to_candidate : CandidateIndex , next_largest : CandidateIndex , count : & SingleCount < Rules :: Tally > , verbose : bool ) -> VoteChange < Rules :: Tally > { let vote_difference = count . status . tallies . candidate [ next_largest . 0 ] . clone ( ) - count . status . tallies . candidate [ to_candidate . 0 ] . clone ( ) ; if verbose { println ! ( " " vote_difference ) ; } return VoteChange { vote_value : vote_difference + Rules :: Tally :: from ( 1 ) , // could probably be improved to minimum increment above self. from : None , to : Some ( to_candidate ) } }
Find an addition that makes to_candidate have a higher number of votes that next_largest.
Find an addition that makes to_candidate have a higher number of votes that next_largest .
to_candidate
CandidateIndex
next_largest
CandidateIndex
count
&SingleCount<Rules::Tally>
verbose
bool
to_candidate
CandidateIndex
next_largest
CandidateIndex
count
&SingleCount<Rules::Tally>
verbose
bool