Hungarian Algorithm · GitHub
https://gist.github.com/KartikTalwar/3158534Hungarian Algorithm Raw HungarianAlgorithm.py #!/usr/bin/python # ecole polytechnique - c.durr - 2009 # Kuhn-Munkres, The hungarian algorithm. Complexity O (n^3) # Computes a max weight perfect matching in a bipartite graph # for min weight matching, simply negate the weights. """ Global variables: n = number of vertices on each side