NAME
Vote::Count::Redact
VERSION 1.03
Methods for Redacting Ballots.
Purpose
Redacting Ballots is useful for what-if analysis and identifying Later Harm effects. Compound Methods seeking to reduce Later Harm effects can also be developed using this technique.
use Vote::Count::Redact qw/RedactPair RedactBullet RedactSingle/;
RedactBullet
Takes a list (array) of choices to be converted to bullet votes. Returns a modified BallotSet where all votes that had a first choice vote for a member of the list are votes for only that choice.
my $newBallotSet = RedactBullet( $VoteCountObject->BallotSet(), 'A', 'B', 'F');
RedactSingle
Return a new BallotSet truncating the ballots after the given choice.
my $newBallotSet = RedactSingle( $VoteCountObject->BallotSet(), $choice);
RedactPair
For a Ballot Set and two choices, on each ballot where both appear it removes the later one and all subsequent choices, returning a completely independent new BallotSet. It is necessary to remove later choices, because otherwise the ballot would be voting against the target later choice, not merely not voting for.
my $newBallotSet = RedactPair( $VoteCountObject->BallotSet(), 'A', 'B');
Todo for RedactPair
Add options to only apply to first choice votes, either making them bullets or only redacting the opposing choice from first choice votes.
BUG TRACKER
https://github.com/brainbuz/Vote-Count/issues
AUTHOR
John Karr (BRAINBUZ) brainbuz@cpan.org
CONTRIBUTORS
Copyright 2019 by John Karr (BRAINBUZ) brainbuz@cpan.org.
LICENSE
This module is released under the GNU Public License Version 3. See license file for details. For more information on this license visit http://fsf.org.