Hungarian algorithm, also known as Munkres algorithm or Kuhn-Munkres algorithm, is a method for solving the assignment problem, for example assigning workers to jobs, which goal is to compute the optimal assignment that minimizes the total cost, and the like. This is a C++ wrapper with slight modification of a hungarian algorithm implementation by Markus Buehren. The original code is a few mex-functions for use in MATLAB, found here: http://www.mathworks.com/matlabcentral/fileexchange/6543-functions-for-the-rectangular-assignment-problem