Change the way the condense_ballots() method works in profiles. Rather than altering the original profile, it returns a new profile. This gives users the option to preserve the original profile.
Add an IRV election class, which is just a wrapper for STV with 1 seat.
Add default option to Borda election class, so users do not have to input a score vector if they want to use the traditional Borda vector.
Alter STV class so that the remaining candidates are always listed in order of current first place votes.
Add print statement to BallotGraph so that when you draw the graph without labels, it prints a dictionary of candidate labels for you.
Add several methods to PairwiseComparisonGraph. Added two boolean methods that return True if there is a condorcet winner or if there is a condorcet cycle. Added two get methods that return the winner or the cycles. Cached the results of dominating_tiers and get_condorcet_cycles.
Fixed an error in the PreferenceProfile tail method.
Added optional to_float method to first_place_votes if users want to see them as floats instead of Fractions.
condense_ballots()
method works in profiles. Rather than altering the original profile, it returns a new profile. This gives users the option to preserve the original profile.BallotGraph
so that when you draw the graph without labels, it prints a dictionary of candidate labels for you.PairwiseComparisonGraph
. Added two boolean methods that return True if there is a condorcet winner or if there is a condorcet cycle. Added two get methods that return the winner or the cycles. Cached the results ofdominating_tiers
andget_condorcet_cycles
.PreferenceProfile
tail method.to_float
method tofirst_place_votes
if users want to see them as floats instead of Fractions.@jamesturk @drdeford @jgibson517 @jennjwang @ziglaser
I will add these to the change log only once the PR has been merged.