saebyn / munkres-cpp

Kuhn-Munkres (Hungarian) Algorithm in C++
http://saebyn.info/2007/05/22/munkres-code-v2/
GNU General Public License v2.0
205 stars 79 forks source link

do this algorithm return max assignment or the minimum one ?? #29

Closed zhuzy-2018 closed 3 years ago

zhuzy-2018 commented 3 years ago

sometimes i get the max return: d2: -0.851823 -0.0848411 0.997337 0.519324 0.752464 0.05258 0.971547 0.304817 -0.311632 dd: -1 -1 0 -1 0 -1 0 -1 -1 pair 0 is :0,2 pair 1 is :1,1 pair 2 is :2,0

sometimes i get the min one: d2: 0.0511896 -0.0754626 -0.831758 0.541599 0.0293286 -0.483856 0.436718 -0.553582 0.285733 dd: -1 -1 0 0 -1 -1 -1 0 -1 pair 0 is :0,2 pair 1 is :1,0 pair 2 is :2,1

why is that? and how can i fix that?