nojhan / paradiseo

An evolutionary computation framework to (automatically) build fast parallel stochastic optimization solvers
https://nojhan.github.io/paradiseo/
Other
92 stars 33 forks source link

[Refactor] Add paradiseo paths on the all #include directives #40

Open ropinho opened 5 years ago

ropinho commented 5 years ago

Absolute includes considers the system paths

The includes within source files is in the form:

#include <eoVector.h>

I believe this form considers the install path of EO, but when ParadisEO was installed, the include path is */paradiseo/eo/. It forces us to use the -I flag on g++ command, including the complete path on compile command. Add the paradiseo path improvements these situation.

In this case:

#include <paradiseo/eo/eoVector.h>

... in all source files.

nojhan commented 5 years ago

Yes, it's an historic remaining. I believe the firsts authors planned to only use <eo> includes in third parties files and I remember that there was problem with includes when we merged EO and all other projects within ParadisEO.

The classical organization would be to use relative includes within the framework, and use full paths <paradiseo/eo> or <paradiseo/eo/eoVector.h out of the framework (i.e. tests, examples and end users). But one should proceed with caution as this may have deep impacts everywhere.

ropinho commented 5 years ago

So, an adaptation for relative include paths would help in utilization of the EO module? Or it isn't needed?

Another question: What the impact of this modification in relation to original EvolvingObjects project? ParadisEO can modify the original source code?

I proppose me to carefully reorganize the include structure using relative #include "file.h" and absolute #include <paradiseo/eo/file.h> where needed within "eofiles" if be interesting to the project. I believe it would improvements on usability of this module, and i would like contribuite to the project. ;)

nojhan commented 5 years ago

The EO project have been merged within ParadisEO and is now maintained here. As it's Free Software, anyone can actually modify the (licensed) source code in its own fork. So far, I'm not aware of another EO fork, anyway.

For the relative include update, I think one should explain the plan on the mailing-list, because I fear I'm missing something here. Can you subscribe to ParadisEO devel ML and post a description of your proposed refactoring, to get some comments?