-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
path size #2
Comments
I can confirm this with the matrix |
I totally share your view. I started to make my c++ version of the original published article in where this repository is based. I wonder if there is a mathematical deduction to the maximum size of the variable path |
Hello, I am looking to use this repository but wanted to check if this was the only problem with it that you guys saw. Did fixing that path vector to be of size 2*sz fix the problem? Are there any other issues that result from this change? Are there any other issues you saw with the repository? |
A user reported an issue on the path size init of the vector: phoemur#2
Hi phoemur,
congratulations on this amazing implementation of the Hungarian Algorithm!
I found a problem with the size of the vector path used on step 5 to track zero primes and zero stars. I believe the size must be at least twice the size of the squared matrix (original). The change should be made on the following line:
hungarian_algorithm/hungarian.cpp
Line 496 in 89af778
It should be 2*sz instead of sz+1.
You can check this problem with the following input:
After a few iterations you end-up on the following situation:
0' 0 0 0* 0
0 0 0* 19 0'
64 64 64 0' 64
0 0* 0' 19 0
0* 0' 0 18 0
In this situation you will added the 9 elements in bold on the path vector but its size is 5 resulting in a segmentation fault.
Cheers!
The text was updated successfully, but these errors were encountered: