Calculate the winner of a Schulze method election.
This gem is intended for command-line use, though it may work alright as a library.
This program was designed against a particular use-case... specifically, candidates must have unique last names (where last name is defined as the last element of a split
). This was done because data on first names tends to be unclean (e.g., "Tim" & "Timothy" are the same person).
Install it:
$ gem install schulze
Collect ballots in a directory. Each ballot should be a file in the form:
1 A
2 B
3 C1
3 C2
4 D
Then, run the program:
$ schulze directory/to/ballots/*.txt
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request