The hungarian algorithm for weighted bipartite graph matching, with Python and Matlab bindings