pref_voting 1.17.1__py3-none-any.whl → 1.17.3__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/iterative_methods.py +6 -6
- pref_voting/proportional_methods.py +1575 -0
- {pref_voting-1.17.1.dist-info → pref_voting-1.17.3.dist-info}/METADATA +1 -1
- {pref_voting-1.17.1.dist-info → pref_voting-1.17.3.dist-info}/RECORD +7 -6
- {pref_voting-1.17.1.dist-info → pref_voting-1.17.3.dist-info}/WHEEL +0 -0
- {pref_voting-1.17.1.dist-info → pref_voting-1.17.3.dist-info}/licenses/LICENSE.txt +0 -0
pref_voting/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '1.17.
|
1
|
+
__version__ = '1.17.3'
|
pref_voting/iterative_methods.py
CHANGED
@@ -90,13 +90,13 @@ def _instant_runoff_for_truncated_linear_orders(profile, curr_cands = None, thre
|
|
90
90
|
from pref_voting.profiles_with_ties import ProfileWithTies
|
91
91
|
from pref_voting.iterative_methods import instant_runoff_for_truncated_linear_orders
|
92
92
|
|
93
|
-
prof = ProfileWithTies([{0:1, 1:1},{0:1, 1:2, 2:3, 3:4}, {0:1, 1:3, 2:3}, {3:2}, {0:1}, {0:1}
|
94
|
-
prof.display()
|
93
|
+
prof = ProfileWithTies([{0:1, 1:1},{0:1, 1:2, 2:3, 3:4}, {0:1, 1:3, 2:3}, {3:2}, {0:1}, {0:1}])
|
94
|
+
# prof.display()
|
95
95
|
|
96
96
|
tprof, report = prof.truncate_overvotes()
|
97
97
|
for r, new_r, count in report:
|
98
98
|
print(f"{r} --> {new_r}: {count}")
|
99
|
-
tprof.display()
|
99
|
+
# tprof.display()
|
100
100
|
instant_runoff_for_truncated_linear_orders.display(tprof)
|
101
101
|
|
102
102
|
|
@@ -514,13 +514,13 @@ def instant_runoff_for_truncated_linear_orders(profile, curr_cands = None, thres
|
|
514
514
|
from pref_voting.profiles_with_ties import ProfileWithTies
|
515
515
|
from pref_voting.iterative_methods import instant_runoff_for_truncated_linear_orders
|
516
516
|
|
517
|
-
prof = ProfileWithTies([{0:1, 1:1},{0:1, 1:2, 2:3, 3:4}, {0:1, 1:3, 2:3}, {3:2}, {0:1}, {0:1}
|
518
|
-
prof.display()
|
517
|
+
prof = ProfileWithTies([{0:1, 1:1},{0:1, 1:2, 2:3, 3:4}, {0:1, 1:3, 2:3}, {3:2}, {0:1}, {0:1}])
|
518
|
+
# prof.display()
|
519
519
|
|
520
520
|
tprof, report = prof.truncate_overvotes()
|
521
521
|
for r, new_r, count in report:
|
522
522
|
print(f"{r} --> {new_r}: {count}")
|
523
|
-
tprof.display()
|
523
|
+
# tprof.display()
|
524
524
|
instant_runoff_for_truncated_linear_orders.display(tprof)
|
525
525
|
|
526
526
|
|