-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A solution to the assignment problem -- -- A solution to the assignment problem. @package assignment @version 0.0.1.0 -- | A solution to the assignment problem. module Data.Algorithm.Assignment -- | <math>. Assign elements from two collections to each other so -- that the total cost is minimal. The cost of each combination is given -- the by the first argument and it can be negative. If any of the -- collections is empty the result is the empty list. The sizes of the -- collections need not to match. Finally, there is no guarantees on the -- order of elements in the returned list of pairs. -- -- See: -- https://en.wikipedia.org/wiki/Hungarian_algorithm#Matrix_interpretation assign :: (a -> b -> Int) -> [a] -> [b] -> [(a, b)]