Блог пользователя i4018

Автор i4018, история, 9 лет назад, По-английски

i'm looking for a well written, bug-free and fast code for the bipartite matching algorithm. can anyone share your code please?

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Not my code but I think this is pretty good: http://zobayer.blogspot.com/2010/05/maximum-matching.html

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

thanks.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I want to share my version of bipartite matching, in the hope that, if it is wrong on certain test cases, someone would notice. It is not conventional, in the sense that the "Match" function has one loop instead of two. I have never noticed any notable difference, and the code is pretty short and encapsulated.

https://github.com/bicsi/code_snippets/blob/master/bipartite_match.cpp