mggg / VoteKit

A Swiss Army Knife for computational social choice research
https://votekit.readthedocs.io/en/latest/
MIT License
10 stars 12 forks source link

speedup to run_borda_election() #76

Closed gabeschoenbach closed 1 year ago

gabeschoenbach commented 1 year ago

Instead of calling get_candidates() for each ballot, just designate a list of all the candidates ahead of time. So long as the set of all candidates doesn't change throughout the for loop, this won't break anything.