Fix to ranking algorithm (#826)

* fixed ranking

* fix index error

Co-authored-by: Alexander Mattick <alex.mattick@fau.de>
This commit is contained in:
MattAlexMiracle
2023-01-18 21:27:16 +01:00
committed by GitHub
parent 9b98056001
commit 530194de08
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ def ranked_pairs(ranks: List[List[int]]):
# order by strength of victory (using tideman's original method, don't think it would make a difference for us)
sorted_majorities = []
for i in range(len(ranks[0])):
for j in range(len(ranks[i])):
for j in range(len(ranks[0])):
if tallies[i, j] > 0:
sorted_majorities.append((i, j, tallies[i, j]))
# we don't explicitly deal with tied majorities here