Schulze Method
This repository provides a Python implementation of the Schulze method.
Requirements
-
Install the latest version of Python 3.X.
-
Install the required packages:
pip install -r requirements.txt
Usage
To rank candidates, import and call:
- either the
compute_ranks()
function, with given signature.
from schulze import compute_ranks
schulze_ranking = compute_ranks(candidate_names, weighted_ranking_orders)
- or the
compute_schulze_ranking()
function, with given signature.
from schulze import compute_schulze_ranking
schulze_ranking = compute_schulze_ranking(candidate_names, ballots)