Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.09 KB

README.md

File metadata and controls

38 lines (27 loc) · 1.09 KB

munkres

an implementation of the Hungarian algorithm

This code is heavily based on Bob Pilgrim's work outlined here.

Example

m := NewMatrix(4)
m.A = []int64{94, 93, 20, 37,
        75, 18, 71, 43,
        20, 29, 32, 25,
        37, 72, 17, 73}
fmt.Println(ComputeMunkresMin(m)) // [{0 3} {1 1} {2 0} {3 2}]

The assignment set which minimizes the total utility is:

(0, 3) = 37
(1, 1) = 18
(2, 0) = 20
(3, 2) = 17
       = 92

License

see LICENSE file

Author(s)

Brian Fallik - bfallik at clypd.com

Dependencies

This packages uses stretchr/testify for help with unit test assertions.

Development

We are no longer actively maintaining this package. Please fork it if you wish to develop it further.

Other

Thanks to clypd for agreeing to release this code into the wild.

clypd