manual merge in favor of the CMakeLists of the fusion branch
This commit is contained in:
commit
291bb7ce14
125 changed files with 137738 additions and 846 deletions
5
eo/.gitignore
vendored
Normal file
5
eo/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
*.swp
|
||||
debug/
|
||||
release/
|
||||
*CMakeFiles*
|
||||
*Makefile
|
||||
12
eo/AUTHORS
12
eo/AUTHORS
|
|
@ -1,12 +0,0 @@
|
|||
Pedro Angel Castillo Valdivieso
|
||||
Juan Julian Merelo Guervos
|
||||
Victor Manuel Rivas Santos
|
||||
Gustavo Romero Lopez
|
||||
Maarten Keijzer
|
||||
Marc Schoenauer
|
||||
Jeroen Eggermont
|
||||
Jochen K<>pper
|
||||
Thomas Legrand
|
||||
Clive Canape
|
||||
Johann Dréo <johann.dreo@thalesgroup.com>
|
||||
Caner Candan <caner.candan@thalesgroup.com>
|
||||
|
|
@ -1,116 +1,53 @@
|
|||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
######################################################################################
|
||||
### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line
|
||||
######################################################################################
|
||||
|
||||
#INCLUDE(eo-conf.cmake OPTIONAL)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 1) Main project config
|
||||
######################################################################################
|
||||
|
||||
# set the project namef and other variables
|
||||
PROJECT(EO)
|
||||
|
||||
# CMake > 2.8 is needed, because of the FindOpenMP feature
|
||||
#cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
#SET(PROJECT_VERSION_MAJOR 1)
|
||||
#SET(PROJECT_VERSION_MINOR 1)
|
||||
#SET(PROJECT_VERSION_PATCH 1)
|
||||
SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" CACHE STRING "Package version" FORCE)
|
||||
SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}${PROJECT_VERSION_MISC}" CACHE STRING "Global version" FORCE)
|
||||
SET(GLOBAL_VERSION "${VERSION}")
|
||||
|
||||
SET(PACKAGE_BUGREPORT "eodev-help@sourceforge.net" CACHE STRING "Package bug report" FORCE)
|
||||
SET(PACKAGE_NAME "Evolving Objects" CACHE STRING "Package name" FORCE)
|
||||
SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}"CACHE STRING "Package string full name" FORCE)
|
||||
SET(PACKAGE_TARNAME "eo" CACHE STRING "Package tar name" FORCE)
|
||||
|
||||
# regular expression checking
|
||||
INCLUDE_REGULAR_EXPRESSION("^.*$" "^$")
|
||||
|
||||
# set a language for the entire project.
|
||||
ENABLE_LANGUAGE(CXX)
|
||||
ENABLE_LANGUAGE(C)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
#####################################################################################
|
||||
### 2) Include required modules / configuration files
|
||||
### Include required modules / configuration files
|
||||
#####################################################################################
|
||||
|
||||
FIND_PACKAGE(OpenMP)
|
||||
IF(OPENMP_FOUND)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
# For eo::mpi
|
||||
enable_language(C)
|
||||
|
||||
INCLUDE(CMakeBackwardCompatibilityCXX)
|
||||
# For openmp parallel
|
||||
if(ENABLE_OPENMP)
|
||||
find_package(OpenMP)
|
||||
if(OPENMP_FOUND)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
else()
|
||||
message( "ERROR: You asked for OpenMP but it has not been found." )
|
||||
set(IS_FATAL 1)
|
||||
endif(OPENMP_FOUND)
|
||||
endif(ENABLE_OPENMP)
|
||||
|
||||
INCLUDE(FindDoxygen)
|
||||
if(ENABLE_GNUPLOT)
|
||||
include(FindGnuplot)
|
||||
endif(ENABLE_GNUPLOT)
|
||||
|
||||
INCLUDE(FindGnuplot)
|
||||
# set a special flag if the environment is windows (should do the same in a config.g file)
|
||||
if (WIN32)
|
||||
add_definitions(-D_WINDOWS=1)
|
||||
endif (WIN32)
|
||||
|
||||
INCLUDE(CheckLibraryExists)
|
||||
|
||||
IF(UNIX)
|
||||
INCLUDE(ConfigureChecks.cmake)
|
||||
ENDIF(UNIX)
|
||||
|
||||
INCLUDE(Dart OPTIONNAL)
|
||||
#####################################################################################
|
||||
### Include required modules / configuration files
|
||||
#####################################################################################
|
||||
|
||||
# now create config headers
|
||||
CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
# now create config install_symlink script file
|
||||
CONFIGURE_FILE(install_symlink.py.cmake ${CMAKE_CURRENT_BINARY_DIR}/install_symlink.py)
|
||||
|
||||
# now create PKGBUILD file for archlinux package manager
|
||||
CONFIGURE_FILE(PKGBUILD.cmake ${CMAKE_CURRENT_BINARY_DIR}/PKGBUILD)
|
||||
|
||||
# Set a special flag if the environment is windows (should do the same in a config.g file)
|
||||
IF (WIN32)
|
||||
ADD_DEFINITIONS(-D_WINDOWS=1)
|
||||
ENDIF (WIN32)
|
||||
|
||||
######################################################################################
|
||||
|
||||
######################################################################################
|
||||
configure_file(install_symlink.py.cmake ${CMAKE_CURRENT_BINARY_DIR}/install_symlink.py)
|
||||
|
||||
|
||||
######################################################################################
|
||||
### compilation of examples?
|
||||
######################################################################################
|
||||
|
||||
#SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters file?")
|
||||
|
||||
### Include subdirectories
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 4) Test config
|
||||
######################################################################################
|
||||
|
||||
#IF (ENABLE_CMAKE_TESTING)
|
||||
# ENABLE_TESTING()
|
||||
#ENDIF (ENABLE_CMAKE_TESTING)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 5) Where must cmake go now ?
|
||||
######################################################################################
|
||||
|
||||
#ADD_SUBDIRECTORY(app)
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
add_subdirectory(doc)
|
||||
add_subdirectory(src)
|
||||
|
||||
if(ENABLE_CMAKE_TESTING)
|
||||
add_subdirectory(test)
|
||||
|
|
@ -118,31 +55,9 @@ endif(ENABLE_CMAKE_TESTING)
|
|||
|
||||
if(ENABLE_CMAKE_EXAMPLE)
|
||||
if(${CMAKE_VERBOSE_MAKEFILE})
|
||||
message("EO Examples :")
|
||||
message("EO examples:")
|
||||
endif(${CMAKE_VERBOSE_MAKEFILE})
|
||||
add_subdirectory(tutorial)
|
||||
#add_subdirectory(app) # FIXME must be updated
|
||||
endif(ENABLE_CMAKE_EXAMPLE)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 6) Install pkg-config config file for EO
|
||||
######################################################################################
|
||||
|
||||
SET(PCPREFIX "/usr")
|
||||
SET(PCFLAGS "-leoutils -leo -les -lga -lcma -lgcov")
|
||||
SET(PCINCLUDEDIR "eo")
|
||||
CONFIGURE_FILE(pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/eo.pc)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/eo.pc DESTINATION ${LIB}/pkgconfig COMPONENT headers)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 7) Include packaging
|
||||
######################################################################################
|
||||
|
||||
#INCLUDE(Packaging.cmake)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
In order to create a new release from the current repository, perform the
|
||||
following steps:
|
||||
|
||||
- If necessary, create a branch named "eo_x.y.z"
|
||||
- Set version number in eo-conf.cmake
|
||||
- Check/update NEWS file, set release date and version in NEWS.
|
||||
- use the "archive_current.sh" script to create the source archive
|
||||
- Build the packages
|
||||
- Put source archive and packages files at SourceForge
|
||||
- Post news on SourceForge project-page
|
||||
- Send announcement to mailing lists
|
||||
- Bump version number to next "x.y.z-edge" in eo-conf.cmake
|
||||
|
||||
|
||||
When reaching stable versions:
|
||||
- prepare a message with the following template:
|
||||
-----8<-----
|
||||
A new version of the "Evolving Objects" framework is available.
|
||||
|
||||
EO is a template-based, C++ evolutionary computation library which
|
||||
helps you to write your own stochastic optimization algorithms
|
||||
insanely fast.
|
||||
|
||||
Learn more about EO on the official website:
|
||||
http://eodev.sourceforge.net/
|
||||
|
||||
You will find the release x.y.z at the following address:
|
||||
https://sourceforge.net/projects/eodev/files/eo/
|
||||
|
||||
Here is a summary of the change log:
|
||||
- XXXXX
|
||||
- and more…
|
||||
|
||||
Do not hesitate to submit the bugs you will face:
|
||||
https://sourceforge.net/apps/trac/eodev/wiki/WikiStart
|
||||
|
||||
Happy evolutionary hacking.
|
||||
-----8<-----
|
||||
- Post the message to:
|
||||
- EO news https://sourceforge.net/news/?group_id=9775
|
||||
- EO mailing list: eodev-main@lists.sourceforge.net
|
||||
- ParadisEO mailing list: paradiseo-users@lists.gforge.inria.fr
|
||||
- EC-digest maling list: ec-digest-l@listserv.gmu.edu
|
||||
- JET mailing list: jet@inria.fr
|
||||
|
||||
37
eo/NEWS
37
eo/NEWS
|
|
@ -1,4 +1,29 @@
|
|||
* current version
|
||||
* current release:
|
||||
|
||||
* release 1.3.1 (2012-07-27)
|
||||
- the eo::mpi modules is no longer dependent from boost::mpi
|
||||
- parallel multi-start example
|
||||
- bugfix: an error is now thrown when accessing best_element of an empty population
|
||||
|
||||
* release 1.3.0 (2012-07-24)
|
||||
- features:
|
||||
- delete the deprecated code parts (was marked as deprecated in the release 1.1)
|
||||
- eoSignal: a class to handle signal with eoCheckpoint instances
|
||||
- eoDetSingleBitFlip: bit flip mutation that changes exactly k bits while checking for duplicate
|
||||
- eoFunctorStat: a wrapper to turn any stand-alone function and into an eoStat
|
||||
- generilazed the output of an eoState: now you can change the format, comes with defaults formatting (latex and json)
|
||||
- eoWrongParamTypeException: a new exception to handle cases where a wrong template is given to eoParser::valueOf
|
||||
- added a getParam method to the eoParser, that raise an exception if the parameter has not been declared
|
||||
- eoParserLogger features are now included in the default eoParser
|
||||
- build system:
|
||||
- improvements of the build architecture
|
||||
- create PKGBUILD file for archlinux package manager
|
||||
- a FindEO module for CMake
|
||||
- bugfixes:
|
||||
- fixed regression with gcc 4.7
|
||||
- fixed compilation issues in Microsoft Visual C++, related to time measurement
|
||||
- added several asserts accross the framework (note: asserts are included only in debug mode)
|
||||
- lot of small bugfixes :-)
|
||||
|
||||
* release 1.2 (16. May. 2011)
|
||||
- fixed the incremental allocation issue in variation operators which were
|
||||
|
|
@ -20,11 +45,11 @@
|
|||
- GCC 4.3 compatibility
|
||||
- new versatile log system with several nested verbose levels
|
||||
- classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files:
|
||||
eo/src/eoCombinedInit.h
|
||||
eo/src/eoGenContinue.h
|
||||
eo/src/eoProportionalCombinedOp.h
|
||||
eo/src/utils/eoData.h
|
||||
eo/src/utils/eoStdoutMonitor.h
|
||||
eo/src/eoCombinedInit.h
|
||||
eo/src/eoGenContinue.h
|
||||
eo/src/eoProportionalCombinedOp.h
|
||||
eo/src/utils/eoData.h
|
||||
eo/src/utils/eoStdoutMonitor.h
|
||||
- an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations
|
||||
- new monitor that can write on any ostream
|
||||
- new continuator that can catch POSIX system user signals
|
||||
|
|
|
|||
|
|
@ -2,30 +2,30 @@
|
|||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${EO_SRC_DIR}/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries (mandatory: before 3) )
|
||||
### 2) specify where cmake can find the libraries (mandatory: before 3) )
|
||||
######################################################################################
|
||||
|
||||
LINK_DIRECTORIES(${EO_BINARY_DIR}/lib)
|
||||
link_directories(${EO_BIN_DIR}/lib)
|
||||
|
||||
######################################################################################
|
||||
### 3) Define your target(s): just an executable here
|
||||
### 3) define your target(s): just an executable here
|
||||
######################################################################################
|
||||
|
||||
SET (GPROP_SOURCES gprop.cpp)
|
||||
set (GPROP_SOURCES gprop.cpp)
|
||||
|
||||
# especially for Visual Studio
|
||||
IF(NOT WIN32 OR CYGWIN)
|
||||
ADD_EXECUTABLE(gprop ${GPROP_SOURCES})
|
||||
ADD_DEPENDENCIES(gprop eo eoutils)
|
||||
if(NOT WIN32 OR CYGWIN)
|
||||
add_executable(gprop ${GPROP_SOURCES})
|
||||
add_dependencies(gprop eo eoutils)
|
||||
|
||||
TARGET_LINK_LIBRARIES(gprop eo eoutils)
|
||||
target_link_libraries(gprop eo eoutils)
|
||||
|
||||
SET(GPROP_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(gprop PROPERTIES VERSION "${GPROP_VERSION}")
|
||||
ENDIF(NOT WIN32 OR CYGWIN)
|
||||
set(GPROP_VERSION ${GLOBAL_VERSION})
|
||||
set_target_properties(gprop PROPERTIES VERSION "${GPROP_VERSION}")
|
||||
endif(NOT WIN32 OR CYGWIN)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -2,37 +2,37 @@
|
|||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${EO_SRC_DIR}/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries (mandatory: before 3) )
|
||||
### 2) specify where cmake can find the libraries (mandatory: before 3) )
|
||||
######################################################################################
|
||||
|
||||
LINK_DIRECTORIES(${EO_BINARY_DIR}/lib)
|
||||
link_directories(${EO_BIN_DIR}/lib)
|
||||
|
||||
######################################################################################
|
||||
### 3) Define your target(s): just an executable here
|
||||
### 3) define your target(s): just an executable here
|
||||
######################################################################################
|
||||
|
||||
SET (GPSYMREG_SOURCES main.cpp)
|
||||
set (GPSYMREG_SOURCES main.cpp)
|
||||
|
||||
# no matter what is the OS, hopefully
|
||||
ADD_EXECUTABLE(gpsymreg ${GPSYMREG_SOURCES})
|
||||
add_executable(gpsymreg ${GPSYMREG_SOURCES})
|
||||
|
||||
ADD_DEPENDENCIES(gpsymreg eo eoutils)
|
||||
add_dependencies(gpsymreg eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
### 4) Optionnal: define your target(s)'s version: no effect for windows
|
||||
### 4) optionnal: define your target(s)'s version: no effect for windows
|
||||
######################################################################################
|
||||
|
||||
SET(GPSYMREG_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}")
|
||||
set(GPSYMREG_VERSION ${GLOBAL_VERSION})
|
||||
set_target_properties(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}")
|
||||
|
||||
######################################################################################
|
||||
### 5) Link the librairies for your target(s)
|
||||
### 5) link the librairies for your target(s)
|
||||
######################################################################################
|
||||
|
||||
TARGET_LINK_LIBRARIES(gpsymreg eo eoutils)
|
||||
target_link_libraries(gpsymreg eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries (mandatory: before 3) )
|
||||
######################################################################################
|
||||
|
||||
LINK_DIRECTORIES(${EO_BINARY_DIR}/lib)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/${LIB})
|
||||
|
||||
######################################################################################
|
||||
### 3) Define your target(s): just an executable here
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
##########################################################################################
|
||||
IF (DOXYGEN_FOUND)
|
||||
|
||||
SET(DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "EO documentation directory")
|
||||
SET(EO_DOC_CONFIG_FILE "eo.cfg" CACHE PATH "EO documentation configuration file")
|
||||
SET(EO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "EO documentation directory" FORCE)
|
||||
SET(EO_DOC_CONFIG_FILE "eo.doxyfile" CACHE INTERNAL "EO documentation configuration file")
|
||||
|
||||
# Copy necessary doc files
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/index.h ${DOC_DIR}/index.h COPYONLY)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/index.h ${EO_DOC_DIR}/index.h COPYONLY)
|
||||
FILE(GLOB header_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.htm*)
|
||||
FILE(GLOB pdf_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.pdf)
|
||||
FILE(GLOB jpg_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.jpg)
|
||||
FOREACH (file ${header_files} ${pdf_files} ${jpg_files})
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} ${DOC_DIR}/${file} COPYONLY)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} ${EO_DOC_DIR}/${file} COPYONLY)
|
||||
ENDFOREACH (file)
|
||||
|
||||
# define the doc target
|
||||
|
|
|
|||
1501
eo/doc/eo.doxyfile.cmake
Normal file
1501
eo/doc/eo.doxyfile.cmake
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -31,8 +31,16 @@ def uninstall():
|
|||
print('All symlinks have been removed.')
|
||||
|
||||
def install():
|
||||
for dirname in DATA['dirs']: os.mkdir(dirname)
|
||||
for src, dst in DATA['links']: os.symlink(src, dst)
|
||||
for dirname in DATA['dirs']:
|
||||
try:
|
||||
os.makedirs(dirname)
|
||||
except(os.error):
|
||||
pass
|
||||
for src, dst in DATA['links']:
|
||||
try:
|
||||
os.symlink(src, dst)
|
||||
except:
|
||||
pass
|
||||
print('All symlinks have been installed.')
|
||||
|
||||
def data():
|
||||
|
|
|
|||
|
|
@ -2,16 +2,16 @@
|
|||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
######################################################################################
|
||||
### 2) Define the eo target
|
||||
######################################################################################
|
||||
|
||||
SET(EO_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib)
|
||||
SET(LIBRARY_OUTPUT_PATH ${EO_LIB_OUTPUT_PATH})
|
||||
set(EO_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||
set(LIBRARY_OUTPUT_PATH ${EO_LIB_OUTPUT_PATH})
|
||||
|
||||
SET(EO_SOURCES
|
||||
set(EO_SOURCES
|
||||
eoFunctorStore.cpp
|
||||
eoPersistent.cpp
|
||||
eoPrintable.cpp
|
||||
|
|
@ -20,35 +20,36 @@ SET(EO_SOURCES
|
|||
eoSIGContinue.cpp
|
||||
)
|
||||
|
||||
ADD_LIBRARY(eo STATIC ${EO_SOURCES})
|
||||
INSTALL(TARGETS eo ARCHIVE DESTINATION ${LIB} COMPONENT libraries)
|
||||
|
||||
FILE(GLOB HDRS *.h eo)
|
||||
INSTALL(FILES ${HDRS} DESTINATION include${INSTALL_SUB_DIR}/eo COMPONENT headers)
|
||||
|
||||
INSTALL(DIRECTORY do es ga gp other utils
|
||||
DESTINATION include${INSTALL_SUB_DIR}/eo
|
||||
COMPONENT headers
|
||||
FILES_MATCHING PATTERN "*.h" PATTERN "checkpointing" PATTERN external_eo
|
||||
)
|
||||
add_library(eo STATIC ${EO_SOURCES})
|
||||
|
||||
######################################################################################
|
||||
### 3) Optionnal: define your target(s)'s version: no effect for windows
|
||||
######################################################################################
|
||||
|
||||
SET(EO_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(eo PROPERTIES VERSION "${EO_VERSION}")
|
||||
set(EO_VERSION ${GLOBAL_VERSION})
|
||||
set_target_properties(eo PROPERTIES VERSION "${EO_VERSION}")
|
||||
|
||||
install(TARGETS eo ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
||||
|
||||
file(GLOB HDRS *.h eo)
|
||||
install(FILES ${HDRS} DESTINATION local/include${INSTALL_SUB_DIR}/eo COMPONENT headers)
|
||||
|
||||
install(DIRECTORY do es ga gp other utils
|
||||
DESTINATION local/include${INSTALL_SUB_DIR}/eo
|
||||
COMPONENT headers
|
||||
FILES_MATCHING PATTERN "*.h" PATTERN "checkpointing" PATTERN external_eo
|
||||
)
|
||||
|
||||
######################################################################################
|
||||
### 4) Where must cmake go now ?
|
||||
######################################################################################
|
||||
|
||||
ADD_SUBDIRECTORY(es)
|
||||
ADD_SUBDIRECTORY(ga)
|
||||
ADD_SUBDIRECTORY(utils)
|
||||
add_subdirectory(es)
|
||||
add_subdirectory(ga)
|
||||
add_subdirectory(utils)
|
||||
|
||||
IF(ENABLE_PYEO)
|
||||
ADD_SUBDIRECTORY(pyeo)
|
||||
ENDIF(ENABLE_PYEO)
|
||||
if(ENABLE_PYEO)
|
||||
add_subdirectory(pyeo)
|
||||
endif(ENABLE_PYEO)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
mak@dhi.dk
|
||||
mak@dhi.dk
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -31,7 +31,10 @@
|
|||
#include <utils/eoLogger.h>
|
||||
#include <eoFunctor.h>
|
||||
#include <vector>
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
Applies a unary function to a std::vector of things.
|
||||
|
|
@ -48,29 +51,41 @@ void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
|||
double t1 = 0;
|
||||
|
||||
if ( eo::parallel.enableResults() )
|
||||
{
|
||||
t1 = omp_get_wtime();
|
||||
}
|
||||
{
|
||||
t1 = omp_get_wtime();
|
||||
}
|
||||
|
||||
if (!eo::parallel.isDynamic())
|
||||
{
|
||||
{
|
||||
#pragma omp parallel for if(eo::parallel.isEnabled()) //default(none) shared(_proc, _pop, size)
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
//Visual Studio supports only OpenMP version 2.0 in which
|
||||
//an index variable must be of a signed integral type
|
||||
for (long long i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#else // _MSC_VER
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
#pragma omp parallel for schedule(dynamic) if(eo::parallel.isEnabled())
|
||||
//doesnot work with gcc 4.1.2
|
||||
//default(none) shared(_proc, _pop, size)
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
//Visual Studio supports only OpenMP version 2.0 in which
|
||||
//an index variable must be of a signed integral type
|
||||
for (long long i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#else // _MSC_VER
|
||||
//doesnot work with gcc 4.1.2
|
||||
//default(none) shared(_proc, _pop, size)
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( eo::parallel.enableResults() )
|
||||
{
|
||||
double t2 = omp_get_wtime();
|
||||
eoLogger log;
|
||||
log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' ';
|
||||
}
|
||||
{
|
||||
double t2 = omp_get_wtime();
|
||||
eoLogger log;
|
||||
log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' ';
|
||||
}
|
||||
|
||||
#else // _OPENMP
|
||||
|
||||
|
|
@ -94,7 +109,7 @@ void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
|||
// //default(none) shared(_proc, _pop, size)
|
||||
// for (size_t i = 0; i < size; ++i)
|
||||
// {
|
||||
// _proc(_pop[i]);
|
||||
// _proc(_pop[i]);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
@ -112,7 +127,7 @@ void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
|||
// //default(none) shared(_proc, _pop, size)
|
||||
// for (size_t i = 0; i < size; ++i)
|
||||
// {
|
||||
// _proc(_pop[i]);
|
||||
// _proc(_pop[i]);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ eoCheckPoint<EOT>& do_make_checkpoint(eoParser& _parser, eoState& _state, eoValu
|
|||
// The Stdout monitor will print parameters to the screen ...
|
||||
if ( needStdoutMonitor )
|
||||
{
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(false);
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/);
|
||||
_state.storeFunctor(monitor);
|
||||
|
||||
// when called by the checkpoint (i.e. at every generation)
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ eoCheckPoint<EOT>& do_make_checkpoint(eoParser& _parser, eoState& _state, eoEval
|
|||
// The Stdout monitor will print parameters to the screen ...
|
||||
if ( needStdoutMonitor )
|
||||
{
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(false);
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/);
|
||||
_state.storeFunctor(monitor);
|
||||
|
||||
// when called by the checkpoint (i.e. at every generation)
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ eoCheckPoint<EOT>& do_make_checkpoint_assembled(eoParser& _parser, eoState& _sta
|
|||
|
||||
// STDOUT
|
||||
// ------
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(false);
|
||||
eoStdoutMonitor *monitor = new eoStdoutMonitor(/*false FIXME remove this deprecated prototype*/);
|
||||
_state.storeFunctor(monitor);
|
||||
checkpoint->add(*monitor);
|
||||
monitor->add(*generationCounter);
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@
|
|||
#include <eoEvalCounterThrowException.h>
|
||||
#include <eoEvalTimeThrowException.h>
|
||||
#include <eoEvalUserTimeThrowException.h>
|
||||
#include <eoEvalKeepBest.h>
|
||||
|
||||
// Continuators - all include eoContinue.h
|
||||
#include <eoCombinedContinue.h>
|
||||
|
|
@ -102,6 +103,7 @@
|
|||
#include <eoSharingSelect.h>
|
||||
// Embedding truncation selection
|
||||
#include <eoTruncatedSelectOne.h>
|
||||
#include <eoRankMuSelect.h>
|
||||
|
||||
// the batch selection - from an eoSelectOne
|
||||
#include <eoSelectPerc.h>
|
||||
|
|
@ -141,6 +143,9 @@
|
|||
#include <utils/eoRealVectorBounds.h> // includes eoRealBounds.h
|
||||
#include <utils/eoIntBounds.h> // no eoIntVectorBounds
|
||||
|
||||
// Serialization stuff
|
||||
#include <serial/eoSerial.h>
|
||||
|
||||
// aliens
|
||||
#include <other/external_eo>
|
||||
#include <eoCounter.h>
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
/* FIXME remove in next release
|
||||
/// Ctor - for historical reasons ... should disspear some day
|
||||
eoCombinedContinue( eoContinue<EOT>& _cont1, eoContinue<EOT>& _cont2)
|
||||
: eoContinue<EOT>(), std::vector<eoContinue<EOT>* >()
|
||||
|
|
@ -68,12 +69,14 @@ public:
|
|||
this->push_back(&_cont1);
|
||||
this->push_back(&_cont2);
|
||||
}
|
||||
*/
|
||||
|
||||
void add(eoContinue<EOT> & _cont)
|
||||
{
|
||||
this->push_back(&_cont);
|
||||
}
|
||||
|
||||
/* FIXME remove in next release
|
||||
void removeLast(void)
|
||||
{
|
||||
#ifndef DEPRECATED_MESSAGES
|
||||
|
|
@ -82,6 +85,7 @@ public:
|
|||
|
||||
this->pop_back();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/** Returns false when one of the embedded continuators say so (logical and)
|
||||
|
|
|
|||
|
|
@ -44,11 +44,13 @@ public:
|
|||
rates.push_back(_rate);
|
||||
}
|
||||
|
||||
/* FIXME remove in next release
|
||||
void add(eoInit<EOT> & _init, double _rate, bool _verbose)
|
||||
{
|
||||
eo::log << eo::warnings << "WARNING: the use of the verbose parameter in eoCombinedInit::add is deprecated and will be removed in the next release." << std::endl;
|
||||
add( _init, _rate );
|
||||
}
|
||||
*/
|
||||
|
||||
/** The usual method to add objects to the combination
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -67,4 +67,43 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Termination condition with a count condition (totalGenerations). This continuator contains
|
||||
* a count of cycles, which can be retrieved or set.
|
||||
*
|
||||
* @ingroup Continuators
|
||||
* @ingroup Core
|
||||
*/
|
||||
template< class EOT >
|
||||
class eoCountContinue : public eoContinue< EOT >
|
||||
{
|
||||
public:
|
||||
|
||||
eoCountContinue( ) :
|
||||
thisGenerationPlaceholder( 0 ),
|
||||
thisGeneration( thisGenerationPlaceholder )
|
||||
{
|
||||
// empty
|
||||
}
|
||||
|
||||
eoCountContinue( unsigned long& currentGen ) :
|
||||
thisGenerationPlaceholder( 0 ),
|
||||
thisGeneration( currentGen )
|
||||
{
|
||||
// empty
|
||||
}
|
||||
|
||||
virtual std::string className( void ) const { return "eoCountContinue"; }
|
||||
|
||||
virtual void reset( )
|
||||
{
|
||||
thisGeneration = 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
unsigned long thisGenerationPlaceholder;
|
||||
unsigned long& thisGeneration;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue