NAME
Vote::Count::TopCount
VERSION 0.012
Synopsis
This Role is consumed by Vote::Count it provides TopCount and related Methods to Vote::Count objects.
Definition of Top Count
Top Count is tabulation of the Top Choice vote on each ballot. As choices are eliminated the first choice on some ballots will be removed, the next highest remaining choice becomes the Top Choice for that ballot. When all choices on a ballot are eliminated it becomes exhausted and is no longer counted.
Method TopCount
Takes a hashref of active choices as an optional parameter, if one is not provided it uses the internal active list accessible via the ->Active() method, which itself defaults to the BallotSet's Choices list.
Returns a RankCount object containing the TopCount.
Method TopCountMajority
$self->TopCountMajority( $round_topcount )
or
$self->TopCountMajority( undef, $active_choices )
Will find the majority winner from the results of a topcount, or alternately may be given undef and a hashref of active choices and will topcount the ballotset for just those choices and then find the majority winner.
Returns a hashref of results. It will always include the votes in the round and the thresshold for majority. If there is a winner it will also include the winner and winvotes.
Method EvaluateTopCountMajority
This method wraps TopCountMajority adding logging, the logging of which would be a lot of boiler plate in round oriented methods. It takes the same parameters and returns the same hashref.
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.