First it sets the old Bloc_STAR function as the main function to run the election with the default number of winners as 1.
Second it processes summary data such as the score sums, score histograms, preference matrix, and pairwise matrix first and uses that for the rest of the election. This is a better model for others that want to use this algorithm in a real election as they wouldn't be constantly rerunning checks on all the ballots and is more readable. I'm open to a better name for summary_data, I just went off of what was there but I think we can find a more descriptive name.
Third it allows you to pass in the summary data instead of the ballots. This could help in testing weird edge case tie breakers without having to figure out how to make it work in the ballots. It would also allow you to process and sum the summary data for a bunch of precincts and pass it in to this function to determine the winners.
Fourth it outputs more detail results for each round instead of just a list of winners. This will help those using this better understand what's going on internally. I'm open to suggestions on better ways to do this.
This adds a few things.
First it sets the old Bloc_STAR function as the main function to run the election with the default number of winners as 1.
Second it processes summary data such as the score sums, score histograms, preference matrix, and pairwise matrix first and uses that for the rest of the election. This is a better model for others that want to use this algorithm in a real election as they wouldn't be constantly rerunning checks on all the ballots and is more readable. I'm open to a better name for summary_data, I just went off of what was there but I think we can find a more descriptive name.
Third it allows you to pass in the summary data instead of the ballots. This could help in testing weird edge case tie breakers without having to figure out how to make it work in the ballots. It would also allow you to process and sum the summary data for a bunch of precincts and pass it in to this function to determine the winners.
Fourth it outputs more detail results for each round instead of just a list of winners. This will help those using this better understand what's going on internally. I'm open to suggestions on better ways to do this.