CMA-ES / libcmaes

libcmaes is a multithreaded C++11 library with Python bindings for high performance blackbox stochastic optimization using the CMA-ES algorithm for Covariance Matrix Adaptation Evolution Strategy
Other
321 stars 78 forks source link

Moving the header files #218

Closed phbasler closed 3 years ago

phbasler commented 3 years ago

Hi @beniz

Sorry for the long delay, but @jwittbrodt and I finally managed to move the header files to the discussed include/libcmaes structure. We testet it with cmake and autogen install and the test functions work.

Please tell me if something does not work as intendend on your side.

Once this is merged, can you maybe do a small release so we can link to this version with our Code?

Cheers Philipp

beniz commented 3 years ago

Thanks @phbasler for the work on this, can you fix the conflicts / rebase and squash commits into a single fix if you don't mind ? I'll then test, merge & release, thanks!

phbasler commented 3 years ago

The resolves are fixed. Is there a way to squash them in an already existing PR or do I have to open a new one?

beniz commented 3 years ago

Great @phbasler you can squash on your branch then force push on, this will update this PR.

phbasler commented 3 years ago

@beniz Like this?

beniz commented 3 years ago

@phbasler great, thank you.

beniz commented 3 years ago

@phbasler the configure build is broken, at minima it requires having a libcmaes/cmaes_export.h dir and file in src/ and the same in include/. Do we really need this cmaes_export.h header ?

beniz commented 3 years ago

It'd be OK to remove the autotools build later on, in another PR, but at this stage, I'd rather keep it in working state.

phbasler commented 3 years ago

@beniz You only need to echo "#define CMAES_EXPORT" > include/libcmaes/cmaes_export.h in the top directory, then the configure build works. With this you don't need to set an env variable in your bash shell. I added it to the Readme

phbasler commented 3 years ago

I forgot to mention one thing which I did not manage with autogen: Everyone with a manual created makefile will have to change one small thing for backwards compatibility: Instead of just including path/to/libcmaes/include they will also have to include path/to/libcmaes/include/libcmaes , then the old code will work. If you know any autogen vodoo to get this done automatically I would be happy to adjust

beniz commented 3 years ago

OK, thanks for the info, can you update the README so that the echo step is the right one ? I'll merge after that. Thanks.

phbasler commented 3 years ago

The readme already has the updated echo command. See line 55 of the readme file

beniz commented 3 years ago

oops, my apologies, looked at the wrong one.