jamespayor / weighted-bipartite-perfect-matching

Fast C++ implementation of an O(NM) algorithm for the assignment problem.
MIT License
52 stars 11 forks source link

Does the library support C++17? Interested in making a ROS 2 wrapper package. #7

Closed Mechazo11 closed 2 months ago

Mechazo11 commented 2 months ago

Hi @jamespayor

Thank you very much for making this performance-oriented version of the Hungarian algorithm publicly available. I am interested in writing up a ROS 2 Humble wrapper package to integrate your matching algorithm. In this regard, is your code compatible with C++17 (or C++14)?. The Cmake file shows it was compatible with C++11.

Thanks, @Mechazo11

jamespayor commented 2 months ago

(I deleted that spam/malware comment, if that was in error let me know.)

jamespayor commented 2 months ago

@Mechazo11 the code here doesn't rely on any advanced features, just std::vector last I remember, and that can be rewritten to just use arrays. I believe that's been done here (in a C version): https://github.com/weaversa/weighted-bipartite-perfect-matching

Probably the code compiles fine with C++17, maybe some imports need to be fixed. I'm not very active in C++, otherwise I'd know for sure.

Other questions or feedback are welcome, hope this helps.

Mechazo11 commented 2 months ago

Thank you for the quick reply. Which version would be most performant the C++ or the C version?

jamespayor commented 2 months ago

The C version presently looks equivalent in terms of operations, but is allocating on the heap rather than the stack (i.e. some of my arrays are allocated on the stack, which was probably a mistake on my part). So would probably prefer the C version and have fewer issues running it.

Mechazo11 commented 2 months ago

Hi @jamespayor thank you very much for getting back to me. I am currently working on another part of the project but once I get to the bipartite graph matching problem, I will add this library as a shared library for the ROS 2 package. I will keep you posted about its progress.

jamespayor commented 2 months ago

Sorry I missed your question for that long! Best of luck