yongyanghz / LAPJV-algorithm-c

Jonker-Volgenant / LAPJV algorithm for the linear assignment problem, in C language
32 stars 11 forks source link

modernize code #8

Open Dharmesh946 opened 3 months ago

Dharmesh946 commented 3 months ago

The code is actually almost C and not C++. Would a translation to C++ be feasible (especially using modern data structures instead of dynamically allocated plain arrays)?

yongyanghz commented 2 months ago

The legacy code is in C language, and it competes in runtime performance, if the code works well, we may not have strong motivation and reason to change it. And the API is straight forward to use. Unless we find a strong reason to modernize the code, we shall keep it.

Dharmesh946 commented 2 months ago

Hi, thanks for your comment

It would be less memory-error-prone to let the user use containers instead of raw arrays. Even better, the LAP seems to be well fitted for Eigen library as some operations can be expressed in terms of vectors and matrices.

yongyanghz commented 2 months ago

Support stl containers is a strong reason, I'll reopen and look into it.