-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
A little question about track.hpp #2267
Comments
Can you propose the change in a PR so we can investigate and clearly see the change you are proposing? |
|
For this last one.. fell free to make the change locally and run the unit test. It seems indeed a bit strange. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 135-136 in track.hpp, I wonder if "const auto & feat = map_node_to_index[k]; const uint32_t & track_id = uf_tree.Find(feat.second);" make it more reasonable?
Because in line 188, the input of "uf_tree.Union()" is "map_node_to_index[k].second", the input of "uf_tree.Find()" should be the same, but "k" (line 135) is the index of "m_vec" in "class flat_pair_map". The code works well in line 135 because the value of "k" and "map_node_to_index[k].second" is the same when elements are already sorted after allFeatures.emplace() (type "set", line 74, 85), which means "map_node_to_index.sort()" actually did not work in line 100. If "map_node_to_index.sort()" worked, then the value of "k" and "map_node_to_index[k].second" will be different. The same question also happens in line 184.
I wonder if I've figured it out. Looking forward to your answers and thank you!
Best wishes!
The text was updated successfully, but these errors were encountered: