1
$\begingroup$

I am looking for a C/C++ implementation of the Hungarian method for solving the linear assignment problem with real-valued cost matrix.

Some implementation I found, such as this one, only work for integer costs :(

Any suggestions are very appreciated!

Thank you in advance!

$\endgroup$
  • 1
    $\begingroup$ Wouldn't it work to multiply your cost by a big constant and take the integer part of it ? so that you could directly use the link mentioned in the question, at the expense of loosing a little bit of precision, if you can afford it. $\endgroup$ – BrunoLevy Nov 7 '15 at 10:15
  • $\begingroup$ Go to CRAN and download the "clue" package source. The LSAP code contains a C implementation of the Hungarian method. $\endgroup$ – Biswajit Banerjee Nov 7 '15 at 19:36
1
$\begingroup$

This one seems to work great for me:

https://github.com/mcximing/hungarian-algorithm-cpp

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.