Skip to content

jfrelinger/cython-munkres-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Munkres Readme

Munkres calculates the minimum cost assignment of the assignment using the Hungarian/Munkres algorithm.

Can handle non-square cost matricies, using algorithm provded by Bougeois and Lassalle in An extension of the Munkres Algorithm for the Assignment Problem to Rectangular Matrices.

Usage

from munkres import munkres
import numpy as np
a = np.array(map(float,'7 4 3 6 8 5 9 4 4'.split()), dtype=np.double).reshape((3,3))
print munkres(a)

which should print out

[[False False  True]
 [ True False False]
 [False  True False]]
https://travis-ci.org/jfrelinger/cython-munkres-wrapper.png?branch=master

About

Python wrapper of a C++ implementation of the Munkres assignment algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published