pref_voting 1.16.31__py3-none-any.whl → 1.17.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pref_voting/__init__.py +1 -1
- pref_voting/pairwise_profiles.py +3 -0
- pref_voting/rankings.py +2 -2
- {pref_voting-1.16.31.dist-info → pref_voting-1.17.1.dist-info}/METADATA +1 -1
- {pref_voting-1.16.31.dist-info → pref_voting-1.17.1.dist-info}/RECORD +7 -7
- {pref_voting-1.16.31.dist-info → pref_voting-1.17.1.dist-info}/WHEEL +0 -0
- {pref_voting-1.16.31.dist-info → pref_voting-1.17.1.dist-info}/licenses/LICENSE.txt +0 -0
pref_voting/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '1.
|
1
|
+
__version__ = '1.17.1'
|
pref_voting/pairwise_profiles.py
CHANGED
@@ -216,6 +216,9 @@ class PairwiseBallot:
|
|
216
216
|
return False
|
217
217
|
return True
|
218
218
|
|
219
|
+
def is_empty(self):
|
220
|
+
"""Return True if the comparisons are empty."""
|
221
|
+
return len(self._comparisons) == 0
|
219
222
|
|
220
223
|
def cycles(self, curr_cands = None):
|
221
224
|
"""Returns the cycles in the pairwise comparisons.
|
pref_voting/rankings.py
CHANGED
@@ -70,8 +70,8 @@ class Ranking(object):
|
|
70
70
|
def is_bullet_vote(self):
|
71
71
|
"""Return True if the ranking is a bullet vote (a vote for a single candidate)"""
|
72
72
|
|
73
|
-
return self.
|
74
|
-
|
73
|
+
return len(self.first()) == 1 and len(self.ranks) == 2
|
74
|
+
|
75
75
|
def cands_at_rank(self, r):
|
76
76
|
"""Returns a list of the candidates that are assigned the rank ``r``."""
|
77
77
|
return [c for c in self.rmap.keys() if self.rmap[c] == r]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pref_voting
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.17.1
|
4
4
|
Summary: pref_voting is a Python package that contains tools to reason about elections and margin graphs, and implementations of voting methods.
|
5
5
|
License: MIT
|
6
6
|
License-File: LICENSE.txt
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pref_voting/__init__.py,sha256=
|
1
|
+
pref_voting/__init__.py,sha256=89nBqIh38Ngg_NbAy6gQPiec_0UERVsBY2sbVqreGgA,23
|
2
2
|
pref_voting/analysis.py,sha256=2YEWqTR6phI3sMIWh-tsm0QOmOgTszBwwUFrXvszrbg,21025
|
3
3
|
pref_voting/axiom.py,sha256=aTON7iEnJywuMHwlNXsF-1KYVccMnylrzfnk52kJX6g,1270
|
4
4
|
pref_voting/axiom_helpers.py,sha256=3APt16me9ZhA8K-GI0PYf9x_Cwe4N4Is1fyG8_jDA1o,3904
|
@@ -63,12 +63,12 @@ pref_voting/monotonicity_axioms.py,sha256=otL0y6XE9o2Dzn6MzVH2wUoN8RpMyERkJ9vMMs
|
|
63
63
|
pref_voting/num_evaluation_method.py,sha256=1n3Xi2BKbk5Fd2T3KSP6kSyJ1PvShSfvUxPgNGIUOXs,2665
|
64
64
|
pref_voting/other_axioms.py,sha256=wm4jzupwGAIU-oEP6bEaIYQxXX_IZ2FQi6T9zT2YAsI,4943
|
65
65
|
pref_voting/other_methods.py,sha256=8_dGVThgNZK7Gdq8Mgq3SMRStbNUYn02BIIfvHW4XnE,43357
|
66
|
-
pref_voting/pairwise_profiles.py,sha256=
|
66
|
+
pref_voting/pairwise_profiles.py,sha256=laBXePxveviFzYemu1XdFPk9Zu7XwOY0P7_xBxofEbw,22104
|
67
67
|
pref_voting/prob_voting_method.py,sha256=PYgaRYhJqX-8QySYnOCYv_6ra5OVYvGc8FYUV2dkH-E,3721
|
68
68
|
pref_voting/probabilistic_methods.py,sha256=HslHc61w9mPuP2ToNih9pl7zLNQw8EicSGqVnMu8vkg,11865
|
69
69
|
pref_voting/profiles.py,sha256=kuhWD-7mwBpHLVlh1H6rx3brfyD5fk1eEbkdFVP5aTo,36307
|
70
70
|
pref_voting/profiles_with_ties.py,sha256=tSjhsocPEidCbZKQfHk3HUmeWQ0O-wNAYTQvFYSLgzs,41023
|
71
|
-
pref_voting/rankings.py,sha256=
|
71
|
+
pref_voting/rankings.py,sha256=FAKPfBvwuNs0yVXgu3kyZ2gjUUDzVaFqOL7Xy2W9xm8,16418
|
72
72
|
pref_voting/scoring_methods.py,sha256=Y8IBfEzbZ_uctYZ8qhz8KivjUeh1geOTw2FcS69s5DQ,21877
|
73
73
|
pref_voting/social_welfare_function.py,sha256=_bnd_Oz4s1twm-N033-rCN2G6DX5Hxb7iruIbVXiFag,1951
|
74
74
|
pref_voting/social_welfare_functions.py,sha256=DrMNmY95CeVkkUJXHTGvJaML7jWzrUAeGjx-Cgru4To,362
|
@@ -86,7 +86,7 @@ pref_voting/voting_method_properties.py,sha256=xwYaiIXTS5JdqFP9LNqcpB7ANfA58vdxY
|
|
86
86
|
pref_voting/voting_methods.py,sha256=6dSuOoz8gMFlN6oN20p-C-iEnpQD_bZevVUGVZ1qntU,299
|
87
87
|
pref_voting/voting_methods_registry.py,sha256=AoLxRDajlaJdnXKjpYlpnlEKWxCL4FBOyh40p_x-RBQ,5028
|
88
88
|
pref_voting/weighted_majority_graphs.py,sha256=J_OoHcMSjvV97i-3VQ88oBUHgLWJa59mT8feh_gseHk,59095
|
89
|
-
pref_voting-1.
|
90
|
-
pref_voting-1.
|
91
|
-
pref_voting-1.
|
92
|
-
pref_voting-1.
|
89
|
+
pref_voting-1.17.1.dist-info/METADATA,sha256=i4Vgo5pZyM6XP387LU-odanYV-QxyEWpbYlOEmUgI3g,8145
|
90
|
+
pref_voting-1.17.1.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
91
|
+
pref_voting-1.17.1.dist-info/licenses/LICENSE.txt,sha256=HrDgoFIL8aUJAoU2P4CmPR7XKaGq2Mq3arCYa2Jbjiw,1085
|
92
|
+
pref_voting-1.17.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|